summaryrefslogblamecommitdiffstats
path: root/freefilter.c
blob: 442dfd1e20aa333054aed429a1f92f8b16ef1623 (plain) (tree)
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);
  }
}