]> git.sur5r.net Git - openldap/commitdiff
ITS#8218 zero filter after freeing
authorHoward Chu <hyc@openldap.org>
Wed, 19 Aug 2015 14:25:46 +0000 (15:25 +0100)
committerHoward Chu <hyc@openldap.org>
Wed, 19 Aug 2015 14:35:45 +0000 (15:35 +0100)
This appears to be cruft leftover from rev e8c58b4e7f21caa6c0b6006e3528cbad9b8aed45

servers/slapd/controls.c
servers/slapd/saslauthz.c

index 8f7165cf5179a6f87993700c4ad2c40103edaf82..286778f1fef457c0baba6141db864401848064ff 100644 (file)
@@ -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;
        }
index 6e49fe189aa61021424eb8b75eba97e89941b4d5..d65c7b52f924956e136d1e9c509614807bd87c10 100644 (file)
@@ -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 {