]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
chan_sip: remove unnecessary ast_channel_unlock(peer) as RAII looks after it
authoralecdavis <sivad.a@paradise.net.nz>
Tue, 21 Aug 2018 23:45:33 +0000 (11:45 +1200)
committeralecdavis <sivad.a@paradise.net.nz>
Tue, 21 Aug 2018 23:46:32 +0000 (11:46 +1200)
Otherwise console output

        (get_refer_info): mutex 'peer' freed more times than we've locked!
        (get_refer_info): Error releasing mutex: Operation not permitted

    or
        (get_refer_info): attempted unlock mutex 'peer' without owning it!
        (__ast_read): 'peer' was locked here.
        ...dump_backtrace

        (get_refer_info): Error releasing mutex: Operation not permitted
        (__ast_read): mutex 'chan' freed more times than we've locked!

ASTERISK-28011 #close

Change-Id: I6e45f2764ba4f3273a943300f91ac9b461ac2893

channels/chan_sip.c

index b84d13f450f00c0c9198b0f73006d03c8bbec438..47fd40c74169a31bda0825c81a5f2816fc65dbd3 100644 (file)
@@ -18676,7 +18676,6 @@ static int get_refer_info(struct sip_pvt *transferer, struct sip_request *outgoi
                                S_OR(transferer->context, NULL));
                        pbx_builtin_setvar_helper(peer, "__SIPREFERREDBYHDR",
                                S_OR(p_referred_by, NULL));
-                       ast_channel_unlock(peer);
                }
 
                owner_relock = sip_pvt_lock_full(transferer);