pgsql: Clean up Create/DropReplicationSlot query buffer

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Clean up Create/DropReplicationSlot query buffer
Date: 2014-10-06 15:19:00
Message-ID: E1XbA3w-0008IJ-Pd@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Clean up Create/DropReplicationSlot query buffer

CreateReplicationSlot() and DropReplicationSlot() were not cleaning up
the query buffer in some cases (mostly error conditions) which meant a
small leak. Not generally an issue as the error case would result in an
immediate exit, but not difficult to fix either and reduces the number
of false positives from code analyzers.

In passing, also add appropriate PQclear() calls to RunIdentifySystem().

Pointed out by Coverity.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/273b29dbe96b1584dd66615cf8dc83e7e6ae7386

Modified Files
--------------
src/bin/pg_basebackup/streamutil.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Stephen Frost 2014-10-06 15:31:09 Re: pgsql: Refactor replication connection code of various pg_basebackup ut
Previous Message Andres Freund 2014-10-06 10:57:55 pgsql: Add support for managing physical replication slots to pg_receiv