diff --git a/libdispatch/nclist.c b/libdispatch/nclist.c index 4890119d0..679c1b174 100644 --- a/libdispatch/nclist.c +++ b/libdispatch/nclist.c @@ -53,12 +53,16 @@ Free a list and its contents int nclistfreeall(NClist* l) { - size_t i; + size_t i,len; + void** content = NULL; if(l == NULL) return TRUE; - for(i=0;ilength;i++) { - void* value = l->content[i]; + len = l->length; + content = nclistextract(l); + for(i=0;i