mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-30 15:14:17 +00:00
fix possible bad pointer in global vars (please test)
This commit is contained in:
1 parent
89c5f3bf82
commit
4ae8282e6c
26 files changed
+185
-100
No files matched your search
@@ -3378,8 +3378,9 @@ static JSBool js_global_get(JSContext * cx, JSObject * obj, uintN argc, jsval *
|
||||
|
||||
if (argc > 0) {
|
||||
var_name = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
|
||||
val = switch_core_get_variable(var_name);
|
||||
val = switch_core_get_variable_dup(var_name);
|
||||
*rval = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, val));
|
||||
free(val);
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user