* [PATCH] fix a memory leak in pack_ptr_list
@ 2005-12-31 7:20 Alecs King
0 siblings, 0 replies; only message in thread
From: Alecs King @ 2005-12-31 7:20 UTC (permalink / raw)
To: linux-sparse
Free the last entry when the whole list gets empty.
Signed-off-by: Alecs King <alecsk@gmail.com>
diff --git a/ptrlist.c b/ptrlist.c
index 14d8416..467a108 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;
}
--
Alecs King
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2005-12-31 7:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-31 7:20 [PATCH] fix a memory leak in pack_ptr_list Alecs King
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.