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

This commit is contained in:
crowder@fiverocks.com 2007-11-28 17:00:33 -08:00
parent 88bb9dd768
commit 28d6419c1d

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;
}