Clean up Create/DropReplicationSlot query buffer

Stephen Frost <sfrost@snowman.net>

Commit: 273b29dbe96b1584dd66615cf8dc83e7e6ae7386
Author: Stephen Frost <sfrost@snowman.net>
Date: 2014-10-06T15:18:13Z
Releases: 9.5.0
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.

Files

PathChange+/−
src/bin/pg_basebackup/streamutil.c modified +22 −0