From f13bd7d90fc2063793686b96eb7f609be31fae48 Mon Sep 17 00:00:00 2001 From: Matthew Jordan Date: Wed, 12 Jun 2013 02:19:52 +0000 Subject: [PATCH] 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 --- main/loader.c | 2 ++ 1 file changed, 2 insertions(+) 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; } } -- 2.47.3