]> 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:09:35 +0000 (17:09 +0200)
committerAndres Freund <andres@anarazel.de>
Wed, 12 Aug 2015 15:35:57 +0000 (17:35 +0200)
commit2e6f6f3abe6fd249cc8a4d5eb194295ac3988b19
treeb204dac4ab3635341d6a2e57d9eedc2f4804667c
parent43a8ed26c97e36d971b6018d1bc94ad5c52d169b
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