Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 234e4cf

Browse files
committed
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.
1 parent 070518d commit 234e4cf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/bin/pg_dump/parallel.c

+3
Original file line numberDiff line numberDiff line change
@@ -922,6 +922,9 @@ WaitForCommands(ArchiveHandle *AH, int pipefd[2])
922922
exit_horribly(modulename,
923923
"unrecognized command on communication channel: %s\n",
924924
command);
925+
926+
/* command was pg_malloc'd and we are responsible for free()ing it. */
927+
free(command);
925928
}
926929
}
927930

0 commit comments

Comments
 (0)