[svn-commits] gtjoseph: branch 13 r430395 - /branches/13/res/res_pjsip_outbound_registration.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jan 8 15:37:49 CST 2015


Author: gtjoseph
Date: Thu Jan  8 15:37:42 2015
New Revision: 430395

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=430395
Log:
res_pjsip_outbound_registration: Fix reference leak.

Every time a registration started, sip_outbound_registration_response_cb bumps 
the ref count on client_state then pushes a handle_registration_response task.  
handle_registration_response never unreffed it though.  So every time a 
registration goes out, the ref count goes up by one.

This patch adds the unreffs to handle_registration_response.

Tested-by: George Joseph

Review: https://reviewboard.asterisk.org/r/4303/


Modified:
    branches/13/res/res_pjsip_outbound_registration.c

Modified: branches/13/res/res_pjsip_outbound_registration.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/res/res_pjsip_outbound_registration.c?view=diff&rev=430395&r1=430394&r2=430395
==============================================================================
--- branches/13/res/res_pjsip_outbound_registration.c (original)
+++ branches/13/res/res_pjsip_outbound_registration.c Thu Jan  8 15:37:42 2015
@@ -398,7 +398,7 @@
 	pjsip_regc_info info;
 	char server_uri[PJSIP_MAX_URL_SIZE], client_uri[PJSIP_MAX_URL_SIZE];
 
-	cancel_registration(client_state);
+	ao2_ref(client_state, -1);
 
 	if ((client_state->status == SIP_REGISTRATION_STOPPED) ||
 		(pjsip_regc_register(client_state->client, PJ_FALSE, &tdata) != PJ_SUCCESS)) {




More information about the svn-commits mailing list