Merge pull request #1719 in FS/freeswitch from ~SILIK0N/freeswitch:master to master

* commit '7b0d25daa33f39d49cecb7e4f26b16f89e23594e':
  FS-11830 memory leak in SWITCH_STANDARD_API(enum_function)
This commit is contained in:
Mike Jerris
2019-05-09 16:06:51 -05:00
+2
View 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;
}