Skip site navigation (1) Skip section navigation (2)

Re: [PATCH] initialize pgconn to null

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Scot Loach" <sloach(at)sandvine(dot)com>, <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: [PATCH] initialize pgconn to null
Date: 2005-10-25 07:35:35
Message-ID: E7F85A1B5FF8D44C8A1AF6885BC9A0E4CC36AA@ratbert.vale-housing.co.uk (view raw or flat)
Thread:
Lists: pgsql-odbc
Thanks Scot, patch applied.

Regards, Dave 

> -----Original Message-----
> From: pgsql-odbc-owner(at)postgresql(dot)org 
> [mailto:pgsql-odbc-owner(at)postgresql(dot)org] On Behalf Of Scot Loach
> Sent: 25 October 2005 02:29
> To: pgsql-odbc(at)postgresql(dot)org
> Subject: [ODBC] [PATCH] initialize pgconn to null
> 
> This patch fixes a potential segfault that can happen if a 
> dbc handle is created and then destroyed without attempting a 
> connection.
> 
> The problem is that CC_Constructor doesn't initialize this 
> new member variable.
> 
> --- connection.c.old    2005-10-24 21:23:55.000000000 -0400
> +++ connection.c        2005-10-24 21:16:39.000000000 -0400
> @@ -2443,6 +2443,7 @@
>                 rv->current_schema = NULL;
>                 rv->num_discardp = 0;
>                 rv->discardp = NULL;
> +                rv->pgconn = NULL;
> 
>                 /* Initialize statement options to defaults */
>                 /* Statements under this conn will inherit 
> these options */
> 
> 
> ---------------------------(end of 
> broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
> 

pgsql-odbc by date

Next:From: Dave PageDate: 2005-10-25 07:39:42
Subject: Re: EN_Destructor bug?
Previous:From: Scot LoachDate: 2005-10-25 01:29:10
Subject: [PATCH] initialize pgconn to null

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group