From: Howard Chu Date: Tue, 26 Aug 2014 18:17:33 +0000 (+0100) Subject: ITS#7927 fix double-free of searchref X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e5f5a4ab5f1f992e2c113e904c65314a0f096ec5;p=openldap ITS#7927 fix double-free of searchref --- diff --git a/servers/slapd/back-mdb/search.c b/servers/slapd/back-mdb/search.c index 2114c10ad0..d90125e8e4 100644 --- a/servers/slapd/back-mdb/search.c +++ b/servers/slapd/back-mdb/search.c @@ -1019,7 +1019,8 @@ notfound: send_search_reference( op, rs ); - mdb_entry_return( op, e ); + if (e != base) + mdb_entry_return( op, e ); rs->sr_entry = NULL; e = NULL; @@ -1184,7 +1185,7 @@ done: rs->sr_v2ref = NULL; } if (base) - mdb_entry_return( op,base); + mdb_entry_return( op, base ); scope_chunk_ret( op, scopes ); return rs->sr_err;