From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Release PQconninfoOptions array in GetDbnameFromConnectionOption
Date: Sun, 24 Mar 2024 16:31:55 +0000
Message-ID: <E1roQlH-005RwL-Ag@gemulon.postgresql.org> (raw)
Release PQconninfoOptions array in GetDbnameFromConnectionOptions().
It wasn't getting freed in one code path, which Coverity identified as
a resource leak. It's probably of little consequence, but re-ordering
the code into the correct sequence is no more work than dismissing the
complaint. Minor oversight in commit a145f424d.
While here, improve the unreasonably clunky coding of
FindDbnameInConnParams: use of an output parameter is unnecessary
and prone to uninitialized-variable problems.
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/d37e0d0c50ee560fa2e7dc2a4dc904a885957985
Modified Files
--------------
src/bin/pg_basebackup/streamutil.c | 29 ++++++++++++++---------------
1 file changed, 14 insertions(+), 15 deletions(-)
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: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Release PQconninfoOptions array in GetDbnameFromConnectionOption
In-Reply-To: <E1roQlH-005RwL-Ag@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