From b581b358003093266c63c123cf59788bdf9e1fee Mon Sep 17 00:00:00 2001 From: taeyoung Date: Tue, 3 Nov 2015 22:53:55 +0900 Subject: [PATCH] list: change g_list_remove_link to g_list_delete_link - g_list_remove_link() just removes the link. Thus the node removed should be freed. - g_list_delete_link() removes the link and frees the node. - This change fixs a memory leak issue. Change-Id: I7f8f1b759d90bb71e54f9b062ae4c0f7564a25d4 Signed-off-by: taeyoung --- src/core/list.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/list.h b/src/core/list.h index 6fda0a6..a67d8a1 100644 --- a/src/core/list.h +++ b/src/core/list.h @@ -29,7 +29,7 @@ typedef GList dd_list; #define DD_LIST_REMOVE(a, b) \ a = g_list_remove(a, (gpointer)b) #define DD_LIST_REMOVE_LIST(a, b) \ - a = g_list_remove_link(a, b) + a = g_list_delete_link(a, b) #define DD_LIST_LENGTH(a) \ g_list_length(a) #define DD_LIST_NTH(a, b) \ -- 2.7.4