Index: channels/chan_sip.c =================================================================== --- channels/chan_sip.c (revision 319020) +++ channels/chan_sip.c (working copy) @@ -23859,7 +23859,9 @@ /* At this point, if we have an authpeer (which we have to have to get here) we should unref * it since if we have actually used it, we have reffed it when p->relatedpeer was set. */ -// authpeer = unref_peer(authpeer, "unref pointer into (*authpeer)"); + if (authpeer) { + authpeer = unref_peer(authpeer, "unref pointer into (*authpeer)"); + } /* Add subscription for extension state from the PBX core */ if (p->subscribed != MWI_NOTIFICATION && p->subscribed != CALL_COMPLETION && !resubscribe) {