psql: Fix memory leak

The command

\password username

leaked memory.
This commit is contained in:
Peter Eisentraut 2012-01-16 20:08:33 +02:00
parent 1575fbcb79
commit 1b9f774090

View File

@ -953,6 +953,9 @@ exec_command(const char *cmd,
PQclear(res);
PQfreemem(encrypted_password);
}
if (opt0)
free(opt0);
}
free(pw1);