mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-12 18:34:36 +08:00
Fix memory leak in psql.
This commit is contained in:
parent
eb9c8e0a59
commit
1952f15c5c
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.74 1997/06/20 02:20:26 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.75 1997/06/29 05:06:43 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1558,6 +1558,7 @@ MainLoop(PsqlSettings * settings, FILE * source)
|
||||
free(line);
|
||||
break;
|
||||
}
|
||||
free(line);
|
||||
} else if (strlen(query) + strlen(query_start) > MAX_QUERY_BUFFER) {
|
||||
fprintf(stderr, "query buffer max length of %d exceeded\n",
|
||||
MAX_QUERY_BUFFER);
|
||||
@ -1573,7 +1574,7 @@ MainLoop(PsqlSettings * settings, FILE * source)
|
||||
} else
|
||||
strcpy(query, query_start);
|
||||
}
|
||||
free(line); /* PURIFY */
|
||||
free(line); /* PURIFY */
|
||||
}
|
||||
|
||||
if (slashCmdStatus == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user