Bug 584912: Fix use after free in jsd_DestroyThreadState. r=timeless, a=sayrer

This commit is contained in:
Andrew Drake 2010-08-10 17:21:11 -07:00
parent c7dbe5a681
commit af9fb85d3c

View File

@ -148,8 +148,8 @@ jsd_NewThreadState(JSDContext* jsdc, JSContext *cx )
* is not enabled for debugging, fail the entire thread state.
*/
JS_INIT_CLIST(&jsdthreadstate->links);
jsd_DestroyThreadState(jsdc, jsdthreadstate);
JS_EndRequest(jsdthreadstate->context);
jsd_DestroyThreadState(jsdc, jsdthreadstate);
return NULL;
}
}