pgsql: ecpg: Fix memory leaks in ecpg_auto_prepare() - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: ecpg: Fix memory leaks in ecpg_auto_prepare()
Date
Msg-id E1ugB1I-0013ID-0X@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
ecpg: Fix memory leaks in ecpg_auto_prepare()

This routines includes three code paths that can fail, with the
allocated prepared statement name going out of scope.

Per report from Coverity.  Oversight in commit a6eabec6808c, that has
played with the order of some ecpg_strdup() calls in this code path.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3151c264d460c0be09131ce90529073631d70ae8

Modified Files
--------------
src/interfaces/ecpg/ecpglib/prepare.c | 9 +++++++++
1 file changed, 9 insertions(+)


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: Fix performance regression with flush of pending fixed-numbered
Next
From: Robert Haas
Date:
Subject: pgsql: Avoid throwing away the error message in syncrep_yyerror.