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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user