]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
On the off chance the if statement takes the false branch, let's not leak the memory
authorWilliam King <william.king@quentustech.com>
Wed, 12 Jun 2013 23:41:06 +0000 (16:41 -0700)
committerWilliam King <william.king@quentustech.com>
Wed, 12 Jun 2013 23:41:24 +0000 (16:41 -0700)
src/mod/languages/mod_spidermonkey/mod_spidermonkey.c

index 552c2c45f01f9898b62bef4c943344970e3386c1..4e7d9571228721fe5805f0430670bb54c5654981 100644 (file)
@@ -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;