[Asterisk-code-review] app_voicemail: Fix module unload leak. (...asterisk[13])

Corey Farrell asteriskteam at digium.com
Thu Sep 19 11:05:59 CDT 2019


Corey Farrell has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/12899


Change subject: app_voicemail: Fix module unload leak.
......................................................................

app_voicemail: Fix module unload leak.

Change-Id: Ib9a06565b9a178822d3bbb67eccf51432e12d84a
---
M apps/app_voicemail.c
1 file changed, 7 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/99/12899/1

diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index a51c3c7..1134ccd 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -15269,6 +15269,11 @@
 #endif
 	ao2_ref(inprocess_container, -1);
 
+	ao2_container_unregister("voicemail_alias_mailbox_mappings");
+	ao2_cleanup(alias_mailbox_mappings);
+	ao2_container_unregister("voicemail_mailbox_alias_mappings");
+	ao2_cleanup(mailbox_alias_mappings);
+
 	if (poll_thread != AST_PTHREADT_NULL)
 		stop_poll_thread();
 
@@ -15340,6 +15345,7 @@
 	if (!mailbox_alias_mappings) {
 		ast_log(LOG_ERROR, "Unable to create mailbox_alias_mappings container\n");
 		ao2_cleanup(inprocess_container);
+		ao2_container_unregister("voicemail_alias_mailbox_mappings");
 		ao2_cleanup(alias_mailbox_mappings);
 		return AST_MODULE_LOAD_DECLINE;
 	}
@@ -15347,6 +15353,7 @@
 	if (res) {
 		ast_log(LOG_ERROR, "Unable to register mailbox_alias_mappings container\n");
 		ao2_cleanup(inprocess_container);
+		ao2_container_unregister("voicemail_alias_mailbox_mappings");
 		ao2_cleanup(alias_mailbox_mappings);
 		ao2_cleanup(mailbox_alias_mappings);
 		return AST_MODULE_LOAD_DECLINE;

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/12899
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: Ib9a06565b9a178822d3bbb67eccf51432e12d84a
Gerrit-Change-Number: 12899
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190919/ec880433/attachment.html>


More information about the asterisk-code-review mailing list