Some work on wtp and ktv config files
FossilOrigin-Name: 3747732055809fd587f96cff65c389a0878a09a197947c1e68a76f605bdb44a0
This commit is contained in:
15
src/cw/mlist_destroy.c
Normal file
15
src/cw/mlist_destroy.c
Normal file
@ -0,0 +1,15 @@
|
||||
#include "mlist.h"
|
||||
|
||||
void mlist_destroy(mlist_t l){
|
||||
mlistelem_t * elem, * next;
|
||||
elem = l->first;
|
||||
while (elem){
|
||||
if (l->del != NULL){
|
||||
l->del(mlistelem_dataptr(elem));
|
||||
}
|
||||
next = elem->next;
|
||||
free(elem);
|
||||
elem=next;
|
||||
}
|
||||
free(l);
|
||||
}
|
||||
Reference in New Issue
Block a user