pg_upgrade: Fix memory leak in check_for_unicode_update().
authorNathan Bossart
Sun, 6 Apr 2025 20:11:41 +0000 (15:11 -0500)
committerNathan Bossart
Sun, 6 Apr 2025 20:11:41 +0000 (15:11 -0500)
commitde48056ec7d237e6a48dce907804ac26c87311ec
tree8f4d22578b8b783052dd241114be02571118841a
parent57dec20fd4691900fbe118699d32640fc538dc20
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
src/bin/pg_upgrade/check.c