From: Howard Chu Date: Wed, 19 Aug 2015 14:25:46 +0000 (+0100) Subject: ITS#8218 zero filter after freeing X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a96fc51ebb867fff2714be22b81e011636763169;p=openldap ITS#8218 zero filter after freeing This appears to be cruft leftover from rev e8c58b4e7f21caa6c0b6006e3528cbad9b8aed45 --- diff --git a/servers/slapd/controls.c b/servers/slapd/controls.c index 8f7165cf51..286778f1fe 100644 --- a/servers/slapd/controls.c +++ b/servers/slapd/controls.c @@ -1413,6 +1413,7 @@ static int parseAssert ( } if( op->o_assertion != NULL ) { filter_free_x( op, op->o_assertion, 1 ); + op->o_assertion = NULL; } return rs->sr_err; } diff --git a/servers/slapd/saslauthz.c b/servers/slapd/saslauthz.c index 6e49fe189a..d65c7b52f9 100644 --- a/servers/slapd/saslauthz.c +++ b/servers/slapd/saslauthz.c @@ -1226,7 +1226,10 @@ is_dn: bv.bv_len = uri->bv_len - (bv.bv_val - uri->bv_val); done: if( rc != LDAP_SUCCESS ) { - if( *filter ) filter_free_x( op, *filter, 1 ); + if( *filter ) { + filter_free_x( op, *filter, 1 ); + *filter = NULL; + } BER_BVZERO( base ); BER_BVZERO( fstr ); } else {