pgsql: pg_upgrade: Fix memory leak in check_for_unicode_update().

From: Nathan Bossart <nathan(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: pg_upgrade: Fix memory leak in check_for_unicode_update().
Date: 2025-04-06 20:12:17
Message-ID: E1u1WLp-0030Ve-08@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

pg_upgrade: Fix memory leak in check_for_unicode_update().

This function was initializing the "task" variable before a couple
of early returns. To fix, postpone the initialization until just
before it's needed.

Per Coverity.

Discussion: https://postgr.es/m/Z_KMsUH2-FEbiNjC%40nathan

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/de48056ec7d237e6a48dce907804ac26c87311ec

Modified Files
--------------
src/bin/pg_upgrade/check.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2025-04-06 20:27:56 pgsql: Doc: fix PDF "contents ... exceed the available area" warnings.
Previous Message Jeff Davis 2025-04-06 16:18:45 Re: pgsql: pg_upgrade: Fix inconsistency in memory freeing