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

Lines changed: 3 additions & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy