Received: from candle.pha.pa.us (candle.navpoint.com [162.33.245.46]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f0K05H070072 for ; Fri, 19 Jan 2001 19:05:17 -0500 (EST) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id TAA19584; Fri, 19 Jan 2001 19:04:58 -0500 (EST) From: Bruce Momjian Message-Id: <200101200004.TAA19584@candle.pha.pa.us> Subject: Re: Memory leak in lobj example code In-Reply-To: "from Nishad Prakash at Oct 16, 2000 10:46:48 am" To: Nishad Prakash Date: Fri, 19 Jan 2001 19:04:58 -0500 (EST) CC: pgsql-docs@postgresql.org X-Mailer: ELM [version 2.4ME+ PL77 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200101/60 X-Sequence-Number: 195 Thanks. I have fixed this. It will appear in 7.1, and in the docs tomorrow. > > In the Programmer's Guide, the sample code for accessing large objects > from libpq has two functions with memory leaks. > > The functions pickout() and overwrite() malloc space for buf which is > never freed. > > See > http://www.postgresql.org/users-lounge/docs/7.0/programmer/largeobjects3207.htm > > This problem is also in the 6.5 docs at > http://www.postgresql.org/users-lounge/docs/6.5/programmer/x3184.htm > > > Nishad > -- > "Underneath the concrete, the dream is still alive" -- Talking Heads > > > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026