mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 23:08:32 +00:00
app_voicemail: Cleanup mailbox topic and cache
app_voicemail wasn't properly cleaning up the stasis cache or the mwi topic pool when the module was unloaded or when a user was deleted as a result of a reload. This resulted in leaks in both areas. * app_voicemail now calls ast_delete_mwi_state_full when it frees a user structure and ast_delete_mwi_state_full in turn now calls the new stasis_topic_pool_delete_topic function to clear the topic from the pool. Change-Id: Ide23144a4a810e7e0faad5a8e988d15947965df8
This commit is contained in:
@@ -2004,6 +2004,10 @@ static void free_user(struct ast_vm_user *vmu)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ast_strlen_zero(vmu->mailbox)) {
|
||||
ast_delete_mwi_state_full(vmu->mailbox, vmu->context, NULL);
|
||||
}
|
||||
|
||||
ast_free(vmu->email);
|
||||
vmu->email = NULL;
|
||||
ast_free(vmu->emailbody);
|
||||
|
||||
Reference in New Issue
Block a user