]> git.ipfire.org Git - thirdparty/postgresql.git/commit
ecpg: Fix memory leaks in ecpg_auto_prepare()
authorMichael Paquier <michael@paquier.xyz>
Sun, 27 Jul 2025 23:38:24 +0000 (08:38 +0900)
committerMichael Paquier <michael@paquier.xyz>
Sun, 27 Jul 2025 23:38:24 +0000 (08:38 +0900)
commit3151c264d460c0be09131ce90529073631d70ae8
treea28da48f00781968a81ba19fd5f9b37b117b59b6
parent793928c2d5ac8e60e1e4054fa3b986369777896d
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.
src/interfaces/ecpg/ecpglib/prepare.c