From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: ecpg: Fix memory leaks in ecpg_auto_prepare()
Date: Sun, 27 Jul 2025 23:43:08 +0000
Message-ID: <E1ugB1I-0013ID-0X@gemulon.postgresql.org> (raw)
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(+)
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 using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: ecpg: Fix memory leaks in ecpg_auto_prepare()
In-Reply-To: <E1ugB1I-0013ID-0X@gemulon.postgresql.org>
* 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