Don't call PQclear until the struct is really no longer going to be used.
Alvaro Herrera <alvherre@alvh.no-ip.org>
Don't call PQclear until the struct is really no longer going to be used. Per Coverity bug #304. Thanks to Martijn van Oosterhout for reporting it. Zero out the pointer fields of PGresult so that these mistakes are more easily catched, per discussion.
Files
| Path | Change | +/− |
|---|---|---|
| src/bin/pg_dump/pg_dump.c | modified | +3 −4 |
| src/interfaces/libpq/fe-exec.c | modified | +7 −1 |