From: Stephen Frost Date: Sun, 14 Jul 2013 21:44:29 +0000 (-0400) Subject: Fix resource leak in initdb -X option X-Git-Tag: REL9_4_BETA1~1330 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5461d36b5b7d99e237b2f63a7975e6430727cb0b;p=postgresql Fix resource leak in initdb -X option When creating the symlink for the xlog directory, free the string which stores the link location. Not really an issue but it doesn't hurt to be good about this- prior cleanups have fixed similar issues. Leak found by the Coverity scanner. Not back-patching as I don't see it being worth the code churn. --- diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index 5fc7291ff6..f66f530288 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -3309,6 +3309,7 @@ create_xlog_symlink(void) fprintf(stderr, _("%s: symlinks are not supported on this platform")); exit_nicely(); #endif + free(linkloc); } }