aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Frost <sfrost@snowman.net>2013-07-14 14:35:26 -0400
committerStephen Frost <sfrost@snowman.net>2013-07-14 14:36:26 -0400
commit8839e7362c68470f8db66acdfa60b95a1c5312cf (patch)
tree5ed9460ca27a3995c770b96fe920453ccf0c0305
parentfb7c0ac42e1a8e3cde74e83e2c758ada8c62a35e (diff)
downloadpostgresql-8839e7362c68470f8db66acdfa60b95a1c5312cf.tar.gz
postgresql-8839e7362c68470f8db66acdfa60b95a1c5312cf.zip
During parallel pg_dump, free commands from master
The command strings read by the child processes during parallel pg_dump, after being read and handled, were not being free'd. This patch corrects this relatively minor memory leak. Leak found by the Coverity scanner. Back patch to 9.3 where parallel pg_dump was introduced.
-rw-r--r--src/bin/pg_dump/parallel.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bin/pg_dump/parallel.c b/src/bin/pg_dump/parallel.c
index ceab58b157c..7208b0fec23 100644
--- a/src/bin/pg_dump/parallel.c
+++ b/src/bin/pg_dump/parallel.c
@@ -922,6 +922,9 @@ WaitForCommands(ArchiveHandle *AH, int pipefd[2])
exit_horribly(modulename,
"unrecognized command on communication channel: %s\n",
command);
+
+ /* command was pg_malloc'd and we are responsible for free()ing it. */
+ free(command);
}
}