FS-11830 memory leak in SWITCH_STANDARD_API(enum_function)

This commit is contained in:
Ken Rice 2019-05-06 11:19:58 -05:00
parent c86f66436e
commit 7b0d25daa3
1 changed files with 2 additions and 0 deletions

View File

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