Re: fix memory leaks in pg_dump

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: fix memory leaks in pg_dump
Date: 2002-11-29 16:38:36
Message-ID: 200211291638.gATGcbv16814@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


Patch applied. Thanks.

---------------------------------------------------------------------------

Neil Conway wrote:
> This patch fixes two tiny memory leaks in pg_dump.
>
> Cheers,
>
> Neil
> --
> Neil Conway <neilc(at)samurai(dot)com> || PGP Key ID: DB3C29FC
>
>

[ text/x-patch is unsupported, treating like TEXT/PLAIN ]

> Index: src/bin/pg_dump/pg_dump.c
> ===================================================================
> RCS file: /var/lib/cvs/pgsql-server/src/bin/pg_dump/pg_dump.c,v
> retrieving revision 1.308
> diff -c -r1.308 pg_dump.c
> *** src/bin/pg_dump/pg_dump.c 23 Nov 2002 03:59:08 -0000 1.308
> --- src/bin/pg_dump/pg_dump.c 27 Nov 2002 21:37:06 -0000
> ***************
> *** 3226,3231 ****
> --- 3226,3232 ----
> "WHERE contypid = '%s'::pg_catalog.oid",
> tinfo->oid);
>
> + PQclear(res);
> res = PQexec(g_conn, chkquery->data);
> if (!res ||
> PQresultStatus(res) != PGRES_TUPLES_OK)
> ***************
> *** 3269,3274 ****
> --- 3270,3276 ----
> destroyPQExpBuffer(q);
> destroyPQExpBuffer(delq);
> destroyPQExpBuffer(query);
> + destroyPQExpBuffer(chkquery);
> }
>
> /*

>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2002-11-29 16:38:40 Re: fix 2 memory leaks in pg_dumpall
Previous Message Tom Lane 2002-11-29 16:05:56 Re: postgresql 7.3 + IPv6 patch