Skip to content

Commit 1b9f774

Browse files
committed
psql: Fix memory leak
The command \password username leaked memory.
1 parent 1575fbc commit 1b9f774

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/bin/psql/command.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,9 @@ exec_command(const char *cmd,
953953
PQclear(res);
954954
PQfreemem(encrypted_password);
955955
}
956+
957+
if (opt0)
958+
free(opt0);
956959
}
957960

958961
free(pw1);

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