Don't call PQclear until the struct is really no longer going to be used.

Alvaro Herrera <alvherre@alvh.no-ip.org>

Commit: 117d73a9e7af61f6742e3d2b46f1dfbe3e02b9ca
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2006-05-28T17:23:29Z
Releases: 8.2.0
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

PathChange+/−
src/bin/pg_dump/pg_dump.c modified +3 −4
src/interfaces/libpq/fe-exec.c modified +7 −1