[asterisk-commits] russell: branch russell/iax2_find_callno r114840 - /team/russell/iax2_find_ca...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Apr 29 13:40:19 CDT 2008
Author: russell
Date: Tue Apr 29 13:40:19 2008
New Revision: 114840
URL: http://svn.digium.com/view/asterisk?view=rev&rev=114840
Log:
Fix double free of pvt
Modified:
team/russell/iax2_find_callno/channels/chan_iax2.c
Modified: team/russell/iax2_find_callno/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/russell/iax2_find_callno/channels/chan_iax2.c?view=diff&rev=114840&r1=114839&r2=114840
==============================================================================
--- team/russell/iax2_find_callno/channels/chan_iax2.c (original)
+++ team/russell/iax2_find_callno/channels/chan_iax2.c Tue Apr 29 13:40:19 2008
@@ -2246,14 +2246,14 @@
/* It is ok to use ast_queue_hangup() here instead of iax2_queue_hangup()
* because we already hold the owner channel lock. */
ast_queue_hangup(owner, -1);
- }
-
- if (pvt->peercallno) {
+
+ ao2_ref(pvt, -1);
+ pvt = NULL;
+ }
+
+ if (pvt && pvt->peercallno) {
remove_by_peercallno(pvt);
}
-
- ao2_ref(pvt, -1);
- pvt = NULL;
}
if (owner) {
More information about the asterisk-commits
mailing list