[mod_voicemail] vm_fsdb_msg_email command leaks xml object.

This commit is contained in:
Andrey Volk 2019-10-07 23:47:35 +04:00
parent e4f95f7069
commit dd1aab3332
1 changed files with 4 additions and 1 deletions

View File

@ -5979,7 +5979,6 @@ SWITCH_STANDARD_API(vm_fsdb_msg_email_function)
if (switch_xml_locate_user_merged("id", id, domain, NULL, &x_user, NULL) != SWITCH_STATUS_SUCCESS) {
stream->write_function(stream, "-ERR Can't locate user.\n");
switch_xml_free(x_user);
goto done;
}
@ -6106,6 +6105,10 @@ SWITCH_STANDARD_API(vm_fsdb_msg_email_function)
done:
switch_core_destroy_memory_pool(&pool);
if (x_user) {
switch_xml_free(x_user);
}
return SWITCH_STATUS_SUCCESS;
}