Re: [BUGS] Libpq free bug? (Was: IIS Postgres ASP ADO - Problem) - Mailing list pgsql-odbc

From Tom Lane
Subject Re: [BUGS] Libpq free bug? (Was: IIS Postgres ASP ADO - Problem)
Date
Msg-id 26045.1122939336@sss.pgh.pa.us
Whole thread Raw
In response to Libpq free bug? (Was: IIS Postgres ASP ADO - Problem)  ("Dave Page" <dpage@vale-housing.co.uk>)
List pgsql-odbc
"Dave Page" <dpage@vale-housing.co.uk> 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

pgsql-odbc by date:

Previous
From: "Greg Campbell"
Date:
Subject: Re: IIS Postgres ASP ADO - Problem
Next
From: Tom Lane
Date:
Subject: Re: Libpq free bug? (Was: IIS Postgres ASP ADO - Problem)