Skip to content
Snippets Groups Projects
Commit 3d80f376 authored by rswindell's avatar rswindell
Browse files

Fixed memory leak in js_sendfile if read failed.

parent c09a03ff
No related branches found
No related tags found
No related merge requests found
......@@ -284,6 +284,7 @@ js_sendfile(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
return(JS_TRUE);
}
if(read(file,buf,len)!=len) {
free(buf);
close(file);
return(JS_TRUE);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment