]> granicus.if.org Git - postgresql/commit
Handle PQresultErrorField(PG_DIAG_SQLSTATE) returning NULL in streamutil.c.
authorAndres Freund <andres@anarazel.de>
Wed, 12 Aug 2015 15:35:50 +0000 (17:35 +0200)
committerAndres Freund <andres@anarazel.de>
Wed, 12 Aug 2015 15:35:50 +0000 (17:35 +0200)
commit7685963eeb16c377c2e0ff7b1852b7a8bc527270
tree5260966fda405496185049a83694ebb7b5b851d0
parentd25fbf9f3ecffb5c80a9201a6310e74da24556a4
Handle PQresultErrorField(PG_DIAG_SQLSTATE) returning NULL in streamutil.c.

In ff27db5d I missed that PQresultErrorField() may return NULL if
there's no sqlstate associated with an error.

Spotted-By: Coverity
Reported-By: Michael Paquier
Discussion: CAB7nPqQ3o10SY6NVdU4pjq85GQTN5tbbkq2gnNUh2fBNU3rKyQ@mail.gmail.com
Backpatch: 9.5, like ff27db5d
src/bin/pg_basebackup/streamutil.c