提交 5e5af427 authored 作者: William King's avatar William King

On the off chance the if statement takes the false branch, let's not leak the memory

上级 56f68be4
...@@ -1112,6 +1112,8 @@ JSObject *new_js_dtmf(switch_dtmf_t *dtmf, char *name, JSContext * cx, JSObject ...@@ -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;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论