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

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

From
Nathan Bossart
Date:
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(-)