[asterisk-commits] mjordan: branch 1.8 r391489 - /branches/1.8/main/loader.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jun 11 21:19:54 CDT 2013


Author: mjordan
Date: Tue Jun 11 21:19:52 2013
New Revision: 391489

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=391489
Log:
Fix memory leak while loading priority modules

When we load a module with the LOAD_PRIORITY flag, we remove its entry from
the load order list. Unfortunately, we don't free the memory associated with
entry in the list. This patch corrects that and properly frees the memory for
the module in the list.



Modified:
    branches/1.8/main/loader.c

Modified: branches/1.8/main/loader.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/loader.c?view=diff&rev=391489&r1=391488&r2=391489
==============================================================================
--- branches/1.8/main/loader.c (original)
+++ branches/1.8/main/loader.c Tue Jun 11 21:19:52 2013
@@ -1021,6 +1021,8 @@
 			break;
 		case AST_MODULE_LOAD_PRIORITY:
 			AST_LIST_REMOVE_CURRENT(entry);
+			ast_free(order->resource);
+			ast_free(order);
 			break;
 		}
 	}




More information about the asterisk-commits mailing list