X-Original-To: pgsql-bugs-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0D68D529E1; Mon, 1 Aug 2005 20:35:40 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 03815-04; Mon, 1 Aug 2005 23:35:34 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 8D4AA52C43; Mon, 1 Aug 2005 20:35:33 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j71NZaCZ026046; Mon, 1 Aug 2005 19:35:36 -0400 (EDT) To: "Dave Page" Cc: pgsql-bugs@postgresql.org, pgsql-odbc@postgresql.org Subject: Re: Libpq free bug? (Was: [ODBC] IIS Postgres ASP ADO - Problem) In-reply-to: References: Comments: In-reply-to "Dave Page" message dated "Mon, 01 Aug 2005 21:06:18 +0100" Date: Mon, 01 Aug 2005 19:35:36 -0400 Message-ID: <26045.1122939336@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200508/10 X-Sequence-Number: 12434 "Dave Page" writes: > Forwarded to -bugs in case it gets missed. > This looks like it might be an issue to me, though I may well have > overlooked something in my brief look at the code. There's nothing wrong with that code. The only modifiable values in the record are the "val" pointers, which are handled correctly. See the comment: * PQconninfoOptions[] is a constant static array that we use to initialize * a dynamically allocated working copy. All the "val" fields in * PQconninfoOptions[] *must* be NULL. In a working copy, non-null "val" * fields point to malloc'd strings that should be freed when the working * array is freed (see PQconninfoFree). regards, tom lane