From: Howard Chu Date: Sat, 31 Jan 2015 01:12:54 +0000 (+0000) Subject: More for presentlist_free X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d395d627e54852a554182e78188382fff486419e;p=openldap More for presentlist_free --- diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index c492c58bde..ac65a46b2a 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -2764,11 +2764,13 @@ presentlist_free( Avlnode *av ) Avlnode **a2 = (Avlnode **)av; int i, count = 0; - for (i=0; i<65536; i++) { - if (a2[i]) - count += avl_free( a2[i], ch_free ); + if ( av ) { + for (i=0; i<65536; i++) { + if (a2[i]) + count += avl_free( a2[i], ch_free ); + } + ch_free( av ); } - ch_free( av ); return count; #else return avl_free( av, ch_free );