Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit541f185

Browse files
committed
From: Igor <igor@sba.miami.edu>
Subject: [PATCHES] patch for a memory leakWell...I screwed up and posted the wrong patch for psql originally..The patch for that patch wposted below will fix it..
1 parente234687 commit541f185

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎src/bin/psql/psql.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.68 1997/06/01 15:53:24 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.69 1997/06/02 03:04:50 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -583,11 +583,13 @@ SendQuery(bool * success_p, PsqlSettings * settings, const char *query,
583583
break;
584584
casePGRES_EMPTY_QUERY:
585585
*success_p= true;
586+
PQclear(results);
586587
break;
587588
casePGRES_COMMAND_OK:
588589
*success_p= true;
589590
if (!settings->quiet)
590591
fprintf(stdout,"%s\n",PQcmdStatus(results));
592+
PQclear(results);
591593
break;
592594
casePGRES_COPY_OUT:
593595
*success_p= true;
@@ -599,13 +601,15 @@ SendQuery(bool * success_p, PsqlSettings * settings, const char *query,
599601

600602
handleCopyOut(results,settings->quiet,stdout);
601603
}
604+
PQclear(results);
602605
break;
603606
casePGRES_COPY_IN:
604607
*success_p= true;
605608
if (copy_in)
606609
handleCopyIn(results, false,copystream);
607610
else
608611
handleCopyIn(results, !settings->quiet,stdin);
612+
PQclear(results);
609613
break;
610614
casePGRES_NONFATAL_ERROR:
611615
casePGRES_FATAL_ERROR:
@@ -630,7 +634,6 @@ SendQuery(bool * success_p, PsqlSettings * settings, const char *query,
630634
notify->relname,notify->be_pid);
631635
free(notify);
632636
}
633-
PQclear(results);
634637
}
635638
}
636639

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp