add freefilter
This commit is contained in:
15
freefilter.c
Normal file
15
freefilter.c
Normal file
@@ -0,0 +1,15 @@
|
||||
#include "ldap.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
void freefilter(struct Filter* f) {
|
||||
if (f) {
|
||||
while (f->a) {
|
||||
struct AttributeList* a=f->a->next;
|
||||
free(f->a);
|
||||
f->a=a;
|
||||
}
|
||||
if (f->x) freefilter(f->x);
|
||||
if (f->next) freefilter(f->next);
|
||||
free(f);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user