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

Bug-fix: introduced js_sprintf_free() to solve DLL malloc/free issue

(assertion) with jsexec->js_printf(). Sorry Deuce. :-)
parent b318b141
Branches
Tags
No related merge requests found
......@@ -65,3 +65,9 @@ js_sprintf(JSContext *cx, uint argn, uintN argc, jsval *argv)
return xp_asprintf_end(p);
}
void DLLCALL
js_sprintf_free(char* p)
{
xp_asprintf_free(p);
}
......@@ -357,7 +357,7 @@ js_printf(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
*rval = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, p));
free(p);
js_sprintf_free(p);
return(JS_TRUE);
}
......
......@@ -1025,6 +1025,7 @@ extern "C" {
/* js_sprintf.c */
DLLEXPORT char* DLLCALL js_sprintf(JSContext* cx, uint argn, uintN argc, jsval *argv);
DLLEXPORT void DLLCALL js_sprintf_free(char *);
/* js_console.cpp */
JSObject* js_CreateConsoleObject(JSContext* cx, JSObject* parent);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment