]> skyeroc.xyz Git - dgamelaunch/commitdiff
Close the file after checking it exists.
authorPasi Kallinen <paxed@alt.org>
Tue, 1 Dec 2009 21:53:28 +0000 (21:53 +0000)
committerPasi Kallinen <paxed@alt.org>
Tue, 1 Dec 2009 21:53:28 +0000 (21:53 +0000)
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@519 db0b04b0-f4d1-0310-9a6d-de3e77497b0e

dgl-common.c

index 9c52c01076b42d7e711ef6f166910e14a1e35b61..2ccb72363ba4905fa6b6aa860e5d12bb643596f3 100644 (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: