Close the file after checking it exists.

git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@519 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
Pasi Kallinen 2009-12-01 21:53:28 +00:00
parent 41c0322ad9
commit 4a258cc775
1 changed files with 4 additions and 1 deletions

View File

@ -211,7 +211,10 @@ dgl_exec_cmdqueue(struct dg_cmdpart *queue, int game, struct dg_user *me)
if (p1 && p2) {
FILE *tmpfile;
tmpfile = fopen(p2, "r");
if (tmpfile) break;
if (tmpfile) {
fclose(tmpfile);
break;
}
}
/* else fall through to cp */
case DGLCMD_CP: