pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Craig Ringer <craig@2ndquadrant.com>
To: pgsql-odbc@postgresql.org
Subject: Re: Failure to exit critical section on error case
Date: Tue, 23 Jun 2015 16:51:39 +0300
Message-ID: <5589646B.2090709@iki.fi> (raw)
In-Reply-To: <CAMsr+YEfEwBOkua-vwT2ELBtAkU+NpDhmPD8kXyWy-rjX6iy_w@mail.gmail.com>
References: <CAMsr+YEfEwBOkua-vwT2ELBtAkU+NpDhmPD8kXyWy-rjX6iy_w@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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



-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



view thread (2+ messages)

Message-ID: <5589646B.2090709@iki.fi>
Permalink:  ../5589646B.2090709@iki.fi/
Also on:    postgresql.org/message-id/5589646B.2090709@iki.fi

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: hlinnaka@iki.fi, craig@2ndquadrant.com
  Subject: Re: Failure to exit critical section on error case
  In-Reply-To: <5589646B.2090709@iki.fi>
  References: <CAMsr+YEfEwBOkua-vwT2ELBtAkU+NpDhmPD8kXyWy-rjX6iy_w@mail.gmail.com> <5589646B.2090709@iki.fi>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox