Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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)