X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=lib%2Frbl.c;h=c5114ef5ef330893e7b4deab7d972affc07389dc;hp=cf0316b77c376ebb52ab23220a7a43af9390893f;hb=9e9e1925b901dff87518f0e1534a33e48eab8303;hpb=8f273f0ee265c75dd8eea65b2f1cd60a79691cd6 diff --git a/lib/rbl.c b/lib/rbl.c index cf0316b7..c5114ef5 100644 --- a/lib/rbl.c +++ b/lib/rbl.c @@ -17,12 +17,16 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: rbl.c,v 1.1.2.7 2000/11/19 22:12:46 guus Exp $ + $Id: rbl.c,v 1.1.2.9 2000/11/21 09:13:59 guus Exp $ */ +#include "config.h" + +#include #include #include "rbl.h" +#include /* Allocate a new rbl node */ rbl_t *new_rbl() @@ -33,6 +37,8 @@ rbl_t *new_rbl() /* Free a rbl node */ void free_rbl(rbl_t *rbl) { + if(rbl->data && rbl->tree->delete) + rbl->tree->delete(rbl->data); free(rbl); } @@ -506,7 +512,8 @@ void rbl_delete_rbltree(rbltree_t *tree) for(rbl = tree->head; rbl; rbl = next) { next = rbl->next; - tree->delete(rbl->data); + if(tree->delete) + tree->delete(rbl->data); } tree->top = NULL;