[svn-commits] gtjoseph: trunk r430396 - in /trunk: ./ res/res_pjsip_outbound_registration.c

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


Author: gtjoseph
Date: Thu Jan  8 15:38:26 2015
New Revision: 430396

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=430396
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/
........

Merged revisions 430395 from http://svn.asterisk.org/svn/asterisk/branches/13

Modified:
    trunk/   (props changed)
    trunk/res/res_pjsip_outbound_registration.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-13-merged' - no diff available.

Modified: trunk/res/res_pjsip_outbound_registration.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip_outbound_registration.c?view=diff&rev=430396&r1=430395&r2=430396
==============================================================================
--- trunk/res/res_pjsip_outbound_registration.c (original)
+++ trunk/res/res_pjsip_outbound_registration.c Thu Jan  8 15:38:26 2015
@@ -462,7 +462,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