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

@ -515,9 +515,11 @@ check_for_isn_and_int8_passing_mismatch(ClusterInfo *cluster)
PQfinish(conn);
}
if (script)
fclose(script);
if (found)
{
fclose(script);
pg_log(PG_REPORT, "fatal\n");
pg_log(PG_FATAL,
"| Your installation contains \"/contrib/isn\" functions\n"
@ -616,9 +618,11 @@ check_for_reg_data_type_usage(ClusterInfo *cluster)
PQfinish(conn);
}
if (script)
fclose(script);
if (found)
{
fclose(script);
pg_log(PG_REPORT, "fatal\n");
pg_log(PG_FATAL,
"| Your installation contains one of the reg* data types in\n"