pgsql: Don't call PQclear until the struct is really no longer going to - Mailing list pgsql-committers

From alvherre@postgresql.org (Alvaro Herrera)
Subject pgsql: Don't call PQclear until the struct is really no longer going to
Date
Msg-id 20060528172329.BA7A69FA38E@postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
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.

Modified Files:
--------------
    pgsql/src/interfaces/libpq:
        fe-exec.c (r1.184 -> r1.185)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/libpq/fe-exec.c.diff?r1=1.184&r2=1.185)
    pgsql/src/bin/pg_dump:
        pg_dump.c (r1.434 -> r1.435)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/pg_dump.c.diff?r1=1.434&r2=1.435)

pgsql-committers by date:

Previous
From: nwakefield@pgfoundry.org (User Nwakefield)
Date:
Subject: bizgres - bizgres: Enhancement: Added code to automatically create the
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix up pg_dump to do string escaping fully correctly for client