Re: Failure to exit critical section on error case

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>, pgsql-odbc(at)postgresql(dot)org
Subject: Re: Failure to exit critical section on error case
Date: 2015-06-23 13:51:39
Message-ID: 5589646B.2090709@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

On 06/15/2015 11:14 AM, Craig Ringer wrote:
> Hi all
>
> A user pointed out that after line 130 in pgxalib.c:
>
> 122 HDBC XAConnection::ActivateConnection(void)
> 123 {
> 124 RETCODE ret;
> 125
> 126 MLOCK_ACQUIRE;
> 127 if (!init_crit.env)
> 128 {
> 129 ret = SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE,
> &init_crit.env);
> 130 if (!SQL_SUCCEEDED(ret))
> 131 return NULL;
> 132 }
> 133 MLOCK_RELEASE;
>
> we fail to MLOCK_RELEASE .
>
> It seems like a trivial fix to just
>
> if (!SQL_SUCCEEDED(ret))
> {
> MLOCK_RELEASE;
> return NULL;
> }
>

Fixed, thanks.

- Heikki

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Heikki Linnakangas 2015-06-23 13:52:36 Re: Minor fixes to Windows tests
Previous Message Travis Staley 2015-06-22 19:15:04 psqlodbc-setup.exe vs psqlodbc.msi