diff options
author | Julian Assange <proff@suburbia.net> | 1996-08-06 00:40:12 +0000 |
---|---|---|
committer | Julian Assange <proff@suburbia.net> | 1996-08-06 00:40:12 +0000 |
commit | 7ef04b25cc59f87abf80ec25c3c1b229bf77a37e (patch) | |
tree | 9446b9e1f0594381628b51fb63167d1898946380 | |
parent | 132e9159eb6ba69d3ed71f6f20a1aef081ab21bd (diff) | |
download | postgresql-7ef04b25cc59f87abf80ec25c3c1b229bf77a37e.tar.gz postgresql-7ef04b25cc59f87abf80ec25c3c1b229bf77a37e.zip |
added patch from kurt that fixes memory leak (didn't free line buffer
for slash commands)
-rw-r--r-- | src/bin/psql/psql.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/bin/psql/psql.c b/src/bin/psql/psql.c index c65d83cc7ce..6ab76ecebca 100644 --- a/src/bin/psql/psql.c +++ b/src/bin/psql/psql.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.15 1996/07/31 02:11:23 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.16 1996/08/06 00:40:12 julian Exp $ * *------------------------------------------------------------------------- */ @@ -1064,10 +1064,14 @@ MainLoop(PsqlSettings *settings, FILE *source) slashCmdStatus = HandleSlashCmds(settings, line, query); - if (slashCmdStatus == 1) + if (slashCmdStatus == 1) { + free(line); continue; - if (slashCmdStatus == 2) + } + if (slashCmdStatus == 2) { + free(line); break; + } if (slashCmdStatus == 0) sendQuery = 1; } |