Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0cd8cb1

Browse files
committed
Free files on dir open failure in COPY.
1 parent0c124c5 commit0cd8cb1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/backend/commands/copy.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.146 2002/02/23 21:46:02 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.147 2002/02/24 02:32:26 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -337,7 +337,7 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe,
337337

338338
fstat(fileno(fp),&st);
339339
if(S_ISDIR(st.st_mode) ){
340-
fclose(fp);
340+
FreeFile(fp);
341341
elog(ERROR,"COPY: %s is a directory.",filename);
342342
}
343343
}
@@ -389,7 +389,7 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe,
389389
(int)geteuid(),filename,strerror(errno),errno);
390390
fstat(fileno(fp),&st);
391391
if(S_ISDIR(st.st_mode) ){
392-
fclose(fp);
392+
FreeFile(fp);
393393
elog(ERROR,"COPY: %s is a directory.",filename);
394394
}
395395
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp