This error handling block caught my eye. It was missing a couple of things,
but it should be safe now. Thanks to mmichelson for the quick peer review
on IRC.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@296628
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
sip_pvt_lock(pvt);
if (create_addr(pvt, epa_entry->destination, NULL, TRUE, NULL)) {
+ sip_pvt_unlock(pvt);
dialog_unlink_all(pvt, TRUE, TRUE);
dialog_unref(pvt, "create_addr failed in transmit_publish. Unref dialog");
+ return -1;
}
ast_sip_ouraddrfor(&pvt->sa, &pvt->ourip, pvt);
ast_set_flag(&pvt->flags[0], SIP_OUTGOING);