Skip to content

Commit a1bb570

Browse files
committed
Fix leak patch that was using fclose() instead of close().
1 parent f175884 commit a1bb570

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/pg_upgrade/file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ copyAndUpdateFile(migratorContext *ctx, pageCnvCtx *pageConverter,
7575

7676
if ((dstfd = open(dst, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR)) < 0)
7777
{
78-
fclose(src_fd);
78+
close(src_fd);
7979
return "can't create destination file";
8080
}
8181

0 commit comments

Comments
 (0)