Commit 1b9f7740 authored by Peter Eisentraut's avatar Peter Eisentraut

psql: Fix memory leak

The command

\password username

leaked memory.
parent 1575fbcb
...@@ -953,6 +953,9 @@ exec_command(const char *cmd, ...@@ -953,6 +953,9 @@ exec_command(const char *cmd,
PQclear(res); PQclear(res);
PQfreemem(encrypted_password); PQfreemem(encrypted_password);
} }
if (opt0)
free(opt0);
} }
free(pw1); free(pw1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment