mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-29 05:30:14 +00:00
On the off chance the if statement takes the false branch, let's not leak the memory
This commit is contained in:
parent
56f68be4e6
commit
5e5af427ef
@ -1112,6 +1112,8 @@ JSObject *new_js_dtmf(switch_dtmf_t *dtmf, char *name, JSContext * cx, JSObject
|
|||||||
JS_SetPrivate(cx, DTMF, ddtmf);
|
JS_SetPrivate(cx, DTMF, ddtmf);
|
||||||
JS_DefineProperties(cx, DTMF, dtmf_props);
|
JS_DefineProperties(cx, DTMF, dtmf_props);
|
||||||
JS_DefineFunctions(cx, DTMF, dtmf_methods);
|
JS_DefineFunctions(cx, DTMF, dtmf_methods);
|
||||||
|
} else {
|
||||||
|
free(ddtmf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return DTMF;
|
return DTMF;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user