[asterisk-commits] file: branch 12 r410844 - /branches/12/res/res_pjsip/config_system.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Mar 18 07:45:08 CDT 2014
Author: file
Date: Tue Mar 18 07:45:01 2014
New Revision: 410844
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=410844
Log:
res_pjsip: Fix memory leak of nameservers in off-nominal resolver creation failure.
Thanks Walter Doekes!
Modified:
branches/12/res/res_pjsip/config_system.c
Modified: branches/12/res/res_pjsip/config_system.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_pjsip/config_system.c?view=diff&rev=410844&r1=410843&r2=410844
==============================================================================
--- branches/12/res/res_pjsip/config_system.c (original)
+++ branches/12/res/res_pjsip/config_system.c Tue Mar 18 07:45:01 2014
@@ -201,6 +201,7 @@
status = pjsip_endpt_create_resolver(ast_sip_get_pjsip_endpoint(), &resolver);
if (status != PJ_SUCCESS) {
ast_log(LOG_ERROR, "Could not create DNS resolver(%d), resorting to system resolution\n", status);
+ ao2_ref(discovered_nameservers, -1);
return 0;
}
}
@@ -241,4 +242,4 @@
void ast_sip_initialize_dns(void)
{
ast_sip_push_task_synchronous(NULL, system_create_resolver_and_set_nameservers, NULL);
-}
+}
More information about the asterisk-commits
mailing list