Обсуждение: pgsql: Don't call PQclear until the struct is really no longer going to

Поиск
Список
Период
Сортировка

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

От
alvherre@postgresql.org (Alvaro Herrera)
Дата:
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)