diff options
author | 2005-12-31 15:20:27 +0800 | |
---|---|---|
committer | 2005-12-31 11:32:36 -0800 | |
commit | 9ea30e2aea4877765c8d41e683e3674af575a338 (patch) | |
tree | 728462f6c2d05e409a744d770e9ede0c9948a546 /ptrlist.c | |
parent | [PATCH] dissect.c (diff) | |
download | sparse-9ea30e2aea4877765c8d41e683e3674af575a338.tar.gz sparse-9ea30e2aea4877765c8d41e683e3674af575a338.tar.bz2 sparse-9ea30e2aea4877765c8d41e683e3674af575a338.zip |
[PATCH] fix a memory leak in pack_ptr_list
Free the last entry when the whole list gets empty.
Signed-off-by: Alecs King <alecsk@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'ptrlist.c')
-rw-r--r-- | ptrlist.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -72,6 +72,7 @@ restart: if (!entry->nr) { struct ptr_list *prev; if (next == entry) { + free(entry); *listp = NULL; return; } |