1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include "ldap.h" #include <stdlib.h> void freefilter(struct Filter* f) { if (f) { freeava(f->a); if (f->x) freefilter(f->x); if (f->next) freefilter(f->next); while (f->substrings) { struct Substring* s=f->substrings->next; free(f->substrings); f->substrings=s; } free(f); } }