diff options
author | Marc G. Fournier <scrappy@hub.org> | 1997-06-02 03:04:50 +0000 |
---|---|---|
committer | Marc G. Fournier <scrappy@hub.org> | 1997-06-02 03:04:50 +0000 |
commit | 541f18558dc1f71cdbd69e840f888fc756b3ba69 (patch) | |
tree | 47427f3b9989f49573efbc91ec4c61c8caedc6b3 /src | |
parent | e234687c4cd1d887dcb8fe777a3f27d31b2bdbdd (diff) |
From: Igor <igor@sba.miami.edu>
Subject: [PATCHES] patch for a memory leak
Well...I screwed up and posted the wrong patch for psql originally..
The patch for that patch wposted below will fix it..
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/psql/psql.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/bin/psql/psql.c b/src/bin/psql/psql.c index e5a4065bec7..817d350e8a7 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.68 1997/06/01 15:53:24 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.69 1997/06/02 03:04:50 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -583,11 +583,13 @@ SendQuery(bool * success_p, PsqlSettings * settings, const char *query, break; case PGRES_EMPTY_QUERY: *success_p = true; + PQclear(results); break; case PGRES_COMMAND_OK: *success_p = true; if (!settings->quiet) fprintf(stdout, "%s\n", PQcmdStatus(results)); + PQclear(results); break; case PGRES_COPY_OUT: *success_p = true; @@ -599,6 +601,7 @@ SendQuery(bool * success_p, PsqlSettings * settings, const char *query, handleCopyOut(results, settings->quiet, stdout); } + PQclear(results); break; case PGRES_COPY_IN: *success_p = true; @@ -606,6 +609,7 @@ SendQuery(bool * success_p, PsqlSettings * settings, const char *query, handleCopyIn(results, false, copystream); else handleCopyIn(results, !settings->quiet, stdin); + PQclear(results); break; case PGRES_NONFATAL_ERROR: case PGRES_FATAL_ERROR: @@ -630,7 +634,6 @@ SendQuery(bool * success_p, PsqlSettings * settings, const char *query, notify->relname, notify->be_pid); free(notify); } - PQclear(results); } } |