Skip to contentSkip to conversation

fix a memory leak in pack_ptr_list

PATCH New Alecs King 1 participant 1 message Dec 31, 2005 Sparse checker

lore
Share & tools
lore

Alecs King

author
#0 lore raw

PATCH 1/1 fix a memory leak in pack_ptr_list

Free the last entry when the whole list gets empty.

ptrlist.c +1 -0
index 14d8416..467a108 100644
@@ -72,6 +72,7 @@ restart:
 			if (!entry->nr) {
 				struct ptr_list *prev;
 				if (next == entry) {
+					free(entry);
 					*listp = NULL;
 					return;
 				}
Signature · 1 line
Alecs King