Re: Use after free? in fe-connect.c:closePGconn

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ranier VF <ranier_gyn(at)hotmail(dot)com>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Use after free? in fe-connect.c:closePGconn
Date: 2016-06-15 23:05:53
Message-ID: 15516.1466031953@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Ranier VF <ranier_gyn(at)hotmail(dot)com> writes:
> In [d:\pginstaller.auto\postgres.windows\src\interfaces\libpq\fe-connect.c,
> closePGconn(PGconn *conn):
> Does not check if conn is NULL.

All the callers do, so I don't entirely see your point.

The stack traces you show look to me like the fault is probably in
the caller, ie, calling PQfinish twice on the same "conn".

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrew Gierth 2016-06-15 23:17:04 Re: BUG #14195: "MultiXactId XXXXXX has not been created yet -- apparent wraparound" after upgrade from 9.2
Previous Message Ranier VF 2016-06-15 21:11:01 Use after free? in fe-connect.c:closePGconn