Bug 405882 - js.c has an unmatched fopen() resource leak, r=igor (not part of the build)

git-svn-id: svn://10.0.0.236/trunk@240081 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
crowder%fiverocks.com
2007-11-29 01:00:33 +00:00
parent b5fe488ac1
commit aba0eecea7

View File

@@ -269,6 +269,8 @@ Process(JSContext *cx, JSObject *obj, char *filename, JSBool forceTTY)
JS_DestroyScript(cx, script);
}
if (file != stdin)
fclose(file);
return;
}
@@ -314,6 +316,8 @@ Process(JSContext *cx, JSObject *obj, char *filename, JSBool forceTTY)
}
} while (!hitEOF && !gQuitting);
fprintf(gOutFile, "\n");
if (file != stdin)
fclose(file);
return;
}