mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Suppress memory leak in COPY WITH OIDS TO wherever.
This commit is contained in:
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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)
|
if (oids && !binary)
|
||||||
{
|
{
|
||||||
CopySendString(DatumGetCString(DirectFunctionCall1(oidout,
|
string = DatumGetCString(DirectFunctionCall1(oidout,
|
||||||
ObjectIdGetDatum(tuple->t_data->t_oid))),
|
ObjectIdGetDatum(tuple->t_data->t_oid)));
|
||||||
fp);
|
CopySendString(string, fp);
|
||||||
CopySendChar(delim[0], fp);
|
CopySendChar(delim[0], fp);
|
||||||
|
pfree(string);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < attr_count; i++)
|
for (i = 0; i < attr_count; i++)
|
||||||
|
Reference in New Issue
Block a user