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_DefineProperties(cx, DTMF, dtmf_props);
|
||||
JS_DefineFunctions(cx, DTMF, dtmf_methods);
|
||||
} else {
|
||||
free(ddtmf);
|
||||
}
|
||||
}
|
||||
return DTMF;
|
||||
|
|
Loading…
Reference in New Issue