From a96fc51ebb867fff2714be22b81e011636763169 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 19 Aug 2015 15:25:46 +0100 Subject: [PATCH] ITS#8218 zero filter after freeing This appears to be cruft leftover from rev e8c58b4e7f21caa6c0b6006e3528cbad9b8aed45 --- servers/slapd/controls.c | 1 + servers/slapd/saslauthz.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) 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 { -- 2.39.5