1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Fix file descriptor leaks in pg_upgrade in failure code paths.

This commit is contained in:
Bruce Momjian
2011-03-08 21:35:42 -05:00
parent 51c0124481
commit d367d41d66
5 changed files with 34 additions and 17 deletions

View File

@ -62,10 +62,11 @@ new_9_0_populate_pg_largeobject_metadata(ClusterInfo *cluster, bool check_mode)
PQfinish(conn);
}
if (script)
fclose(script);
if (found)
{
if (!check_mode)
fclose(script);
report_status(PG_WARNING, "warning");
if (check_mode)
pg_log(PG_WARNING, "\n"