[asterisk-commits] file: branch 1.4 r92363 - /branches/1.4/main/global_datastores.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Dec 11 13:51:40 CST 2007


Author: file
Date: Tue Dec 11 13:51:40 2007
New Revision: 92363

URL: http://svn.digium.com/view/asterisk?view=rev&rev=92363
Log:
Fix potential memory leak with the dialed interfaces list if another memory allocation fails.
(closes issue #11507)
Reported by: eliel
Patches:
      global_datastores.c.patch uploaded by eliel (license 64)

Modified:
    branches/1.4/main/global_datastores.c

Modified: branches/1.4/main/global_datastores.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/global_datastores.c?view=diff&rev=92363&r1=92362&r2=92363
==============================================================================
--- branches/1.4/main/global_datastores.c (original)
+++ branches/1.4/main/global_datastores.c Tue Dec 11 13:51:40 2007
@@ -61,6 +61,7 @@
 		struct ast_dialed_interface *di2 = ast_calloc(1, sizeof(*di2) + strlen(di->interface));
 		if(!di2) {
 			AST_LIST_UNLOCK(old_list);
+			dialed_interface_destroy(new_list);
 			return NULL;
 		}
 		strcpy(di2->interface, di->interface);




More information about the asterisk-commits mailing list