rts: Fix leak of file archive handle
authorAustin Seipp <austin@well-typed.com>
Tue, 29 Apr 2014 14:05:38 +0000 (09:05 -0500)
committerAustin Seipp <austin@well-typed.com>
Tue, 29 Apr 2014 19:08:30 +0000 (14:08 -0500)
Issue discovered by Coverity Scan, CID 43171.

Signed-off-by: Austin Seipp <austin@well-typed.com>
rts/Linker.c

index 1b0d48f..146e2d5 100644 (file)
@@ -2718,6 +2718,7 @@ loadArchive( pathchar *path )
 
             if (0 == loadOc(oc)) {
                 stgFree(fileName);
+                fclose(f);
                 return 0;
             }
         }