]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fixes regression caused by r343635
authorDavid Vossel <dvossel@digium.com>
Tue, 8 Nov 2011 18:29:33 +0000 (18:29 +0000)
committerDavid Vossel <dvossel@digium.com>
Tue, 8 Nov 2011 18:29:33 +0000 (18:29 +0000)
There was a missing unlock for a function return that is only
present in Asterisk 10 and Asterisk Trunk.

(closes issue ASTERISK-18839)
Reported by: Michael L. Young
Patches:
    asterisk-18839-missing-lock-trunk-v2.diff (License #5026) patch uploaded by Michael L. Young

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@343900 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 3fcbc86bcad8300a25546e62ba1a17e57fd6501a..f113b1756adeb4eeeafeca8914c0718ec465e214 100644 (file)
@@ -25889,6 +25889,7 @@ static int sip_send_mwi_to_peer(struct sip_peer *peer, int cache_only)
                peer_mailboxes_to_str(&mailbox_str, peer);
                /* if there is no mailbox do nothing */
                if (ast_strlen_zero(mailbox_str->str)) {
+                       ao2_unlock(peer);
                        return -1;
                }
                ao2_unlock(peer);