diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-11-29 21:26:44 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-11-29 21:26:44 +0000 |
commit | 4b0b333c73c875750fe13222e84142d5a7077fdb (patch) | |
tree | 95eb051bd7f8cd223fbaa757ca7b29706a7874b7 | |
parent | b04d216c4c01042897c644a8be6b761d5e673963 (diff) |
Complete some error handling in transmit_publish() in chan_sip.c.
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: http://svn.digium.com/svn/asterisk/branches/1.8@296628 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_sip.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index a53bbb87c..0feb2c8b8 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -11296,8 +11296,10 @@ static int transmit_publish(struct sip_epa_entry *epa_entry, enum sip_publish_ty 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); |