From: Peter Eisentraut Date: Mon, 16 Jan 2012 18:08:33 +0000 (+0200) Subject: psql: Fix memory leak X-Git-Tag: REL9_2_BETA1~578 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1b9f774090d58a950ef0535b51bc377ab62b795c;p=postgresql psql: Fix memory leak The command \password username leaked memory. --- diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c index 69fac83cd5..6c3f0aa69d 100644 --- a/src/bin/psql/command.c +++ b/src/bin/psql/command.c @@ -953,6 +953,9 @@ exec_command(const char *cmd, PQclear(res); PQfreemem(encrypted_password); } + + if (opt0) + free(opt0); } free(pw1);