git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 13612a9)
Suppress memory leak in COPY WITH OIDS TO wherever.
2000年6月28日 06:05:36 +0000 (06:05 +0000)
2000年6月28日 06:05:36 +0000 (06:05 +0000)

diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c
index e29ed167963c0a8f3d008ac0b6910aa912a1c4b9..177b339be8cdae73677fcea0cb1af282acdb9b4b 100644 (file)
--- a/src/backend/commands/copy.c
+++ b/src/backend/commands/copy.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.115 2000年06月17日 21:48:42 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.116 2000年06月28日 06:05:36 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -475,10 +475,11 @@ CopyTo(Relation rel, bool binary, bool oids, FILE *fp, char *delim, char *null_p
if (oids && !binary)
{
- CopySendString(DatumGetCString(DirectFunctionCall1(oidout,
- ObjectIdGetDatum(tuple->t_data->t_oid))),
- fp);
+ string = DatumGetCString(DirectFunctionCall1(oidout,
+ ObjectIdGetDatum(tuple->t_data->t_oid)));
+ CopySendString(string, fp);
CopySendChar(delim[0], fp);
+ pfree(string);
}
for (i = 0; i < attr_count; i++)
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /