[asterisk-commits] file: branch group/dns r433001 - /team/group/dns/main/dns_core.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 16 13:16:46 CDT 2015


Author: file
Date: Mon Mar 16 13:16:44 2015
New Revision: 433001

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=433001
Log:
Fix leak of some memory in off-nominal case where async query can't be created.

Modified:
    team/group/dns/main/dns_core.c

Modified: team/group/dns/main/dns_core.c
URL: http://svnview.digium.com/svn/asterisk/team/group/dns/main/dns_core.c?view=diff&rev=433001&r1=433000&r2=433001
==============================================================================
--- team/group/dns/main/dns_core.c (original)
+++ team/group/dns/main/dns_core.c Mon Mar 16 13:16:44 2015
@@ -216,6 +216,7 @@
 
 	active->query = ao2_alloc_options(sizeof(*active->query) + strlen(name) + 1, dns_query_destroy, AO2_ALLOC_OPT_LOCK_NOLOCK);
 	if (!active->query) {
+		ao2_ref(active, -1);
 		return NULL;
 	}
 




More information about the asterisk-commits mailing list