Commit 7685963
committed
Handle PQresultErrorField(PG_DIAG_SQLSTATE) returning NULL in streamutil.c.
In ff27db5 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 ff27db51 parent d25fbf9 commit 7685963
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | | - | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
344 | 346 | | |
345 | 347 | | |
346 | 348 | | |
| |||
0 commit comments