]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-11830 memory leak in SWITCH_STANDARD_API(enum_function)
authorKen Rice <krice@sipnavigator.com>
Mon, 6 May 2019 16:19:58 +0000 (11:19 -0500)
committerKen Rice <krice@sipnavigator.com>
Mon, 6 May 2019 16:19:58 +0000 (11:19 -0500)
src/mod/applications/mod_enum/mod_enum.c

index 493e2c176a10edb1f94dbb870be2c1de266ab8ab..3e458dd1297676a583df03c3de6cedfeaf26123e 100644 (file)
@@ -833,12 +833,14 @@ SWITCH_STANDARD_API(enum_function)
                if (!strcasecmp(dest, "reload")) {
                        do_load();
                        stream->write_function(stream, "+OK ENUM Reloaded.\n");
+                       switch_safe_free(mydata);
                        return SWITCH_STATUS_SUCCESS;
 
                }
 
                if (enum_lookup(root, dest, &results, NULL, session) != SWITCH_STATUS_SUCCESS) {
                        stream->write_function(stream, "No Match!\n");
+                       switch_safe_free(mydata);
                        return SWITCH_STATUS_SUCCESS;
                }