From: Matthew Jordan Date: Wed, 12 Jun 2013 02:19:52 +0000 (+0000) Subject: Fix memory leak while loading priority modules X-Git-Tag: 1.8.24.0-rc1~69 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f13bd7d90fc2063793686b96eb7f609be31fae48;p=thirdparty%2Fasterisk.git 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. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@391489 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/loader.c b/main/loader.c index 2b09157935..16ab2d75ee 100644 --- a/main/loader.c +++ b/main/loader.c @@ -1021,6 +1021,8 @@ static int load_resource_list(struct load_order *load_order, unsigned int global break; case AST_MODULE_LOAD_PRIORITY: AST_LIST_REMOVE_CURRENT(entry); + ast_free(order->resource); + ast_free(order); break; } }