[asterisk-commits] russell: branch russell/ast_channel_ao2 r183813 - /team/russell/ast_channel_a...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 23 15:39:53 CDT 2009


Author: russell
Date: Mon Mar 23 15:39:50 2009
New Revision: 183813

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=183813
Log:
Fix a ref leak, and move unlock/unref up a bit

Modified:
    team/russell/ast_channel_ao2/res/res_agi.c

Modified: team/russell/ast_channel_ao2/res/res_agi.c
URL: http://svn.digium.com/svn-view/asterisk/team/russell/ast_channel_ao2/res/res_agi.c?view=diff&rev=183813&r1=183812&r2=183813
==============================================================================
--- team/russell/ast_channel_ao2/res/res_agi.c (original)
+++ team/russell/ast_channel_ao2/res/res_agi.c Mon Mar 23 15:39:50 2009
@@ -603,13 +603,14 @@
 		snprintf(buf, sizeof(buf), "Failed to add AGI command to channel %s queue", chan->name);
 		astman_send_error(s, m, buf);
 		ast_channel_unlock(chan);
+		chan = ast_channel_unref(chan);
 		return 0;
 	}
-
-	astman_send_ack(s, m, "Added AGI command to queue");
 
 	ast_channel_unlock(chan);
 	chan = ast_channel_unref(chan);
+
+	astman_send_ack(s, m, "Added AGI command to queue");
 
 	return 0;
 }




More information about the asterisk-commits mailing list