From 9ea30e2aea4877765c8d41e683e3674af575a338 Mon Sep 17 00:00:00 2001 From: Alecs King Date: Sat, 31 Dec 2005 15:20:27 +0800 Subject: [PATCH] [PATCH] fix a memory leak in pack_ptr_list Free the last entry when the whole list gets empty. Signed-off-by: Alecs King Signed-off-by: Linus Torvalds --- ptrlist.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ptrlist.c b/ptrlist.c index 14d84166..467a1081 100644 --- a/ptrlist.c +++ b/ptrlist.c @@ -72,6 +72,7 @@ restart: if (!entry->nr) { struct ptr_list *prev; if (next == entry) { + free(entry); *listp = NULL; return; } -- 2.11.4.GIT