Fix leak patch that was using fclose() instead of close().
authorBruce Momjian
Tue, 28 Sep 2010 21:37:14 +0000 (21:37 +0000)
committerBruce Momjian
Tue, 28 Sep 2010 21:37:14 +0000 (21:37 +0000)
contrib/pg_upgrade/file.c

index ef797037fb1b6e9741b21a03c0b4f9ae4082fce3..07a7eb8d1441ba03a88455702c4ad0c93a3941ea 100644 (file)
@@ -75,7 +75,7 @@ copyAndUpdateFile(migratorContext *ctx, pageCnvCtx *pageConverter,
 
            if ((dstfd = open(dst, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR)) < 0)
            {
-               fclose(src_fd);
+               close(src_fd);
                return "can't create destination file";
            }