pgsql: pg_upgrade: Fix memory leak in check_for_unicode_update(). - Mailing list pgsql-committers

From Nathan Bossart
Subject pgsql: pg_upgrade: Fix memory leak in check_for_unicode_update().
Date
Msg-id E1u1WLp-0030Ve-08@gemulon.postgresql.org
Whole thread Raw
List 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(-)


pgsql-committers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: pgsql: pg_upgrade: Fix inconsistency in memory freeing
Next
From: Tom Lane
Date:
Subject: pgsql: Doc: fix PDF "contents ... exceed the available area" warnings.