From: Bruce Momjian Date: Tue, 28 Sep 2010 21:37:14 +0000 (+0000) Subject: Fix leak patch that was using fclose() instead of close(). X-Git-Tag: REL9_0_1~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0364ab8b26c105b94e45c9519400796c1439f1b1;p=thirdparty%2Fpostgresql.git Fix leak patch that was using fclose() instead of close(). --- diff --git a/contrib/pg_upgrade/file.c b/contrib/pg_upgrade/file.c index ef797037fb1..07a7eb8d144 100644 --- a/contrib/pg_upgrade/file.c +++ b/contrib/pg_upgrade/file.c @@ -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"; }