EN_Destructor bug? - Mailing list pgsql-odbc

From Tom Hughes
Subject EN_Destructor bug?
Date
Msg-id yek1x2hy50l.fsf@dellow.uk.cyberscience.com
Whole thread Raw
List pgsql-odbc
When EN_Destructor is called it searches through the connection array
and destroys any connections which belong that environment. Unfortunately
it doesn't NULL out the connection array entry afterwards so a future
call to EN_Destructor can wind up trying to destroy that connection
again if another environment has been allocated at the same address.

Also, shouldn't EN_Destructor hold the CONNS critical section while it
is playing with the connection array?

The attached patch fixes both of these issues and seems to have fixed
the crashes I was observing.

Tom

--
Tom Hughes (thh@cyberscience.com)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/


Attachment

pgsql-odbc by date:

Previous
From: "Scot Loach"
Date:
Subject: [PATCH] initialize pgconn to null
Next
From: Sérgio
Date:
Subject: Re: ODBC driver and linked server in MSSQL 2k