From: Stephen Frost Date: Sun, 14 Jul 2013 18:35:26 +0000 (-0400) Subject: During parallel pg_dump, free commands from master X-Git-Tag: REL9_3_RC1~72 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8839e7362c68470f8db66acdfa60b95a1c5312cf;p=postgresql 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. --- diff --git a/src/bin/pg_dump/parallel.c b/src/bin/pg_dump/parallel.c index ceab58b157..7208b0fec2 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); } }