From d0bcaee0f329d232fd9354dfbd501311070fa9b7 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 6 Mar 2012 22:15:51 -0800 Subject: [PATCH] ITS#7190 don't crash in slapcat on NULL entry --- servers/slapd/back-mdb/tools.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/servers/slapd/back-mdb/tools.c b/servers/slapd/back-mdb/tools.c index 7dbb136ebc..42d2c420a0 100644 --- a/servers/slapd/back-mdb/tools.c +++ b/servers/slapd/back-mdb/tools.c @@ -335,8 +335,10 @@ mdb_tool_entry_get_int( BackendDB *be, ID id, Entry **ep ) rc = mdb_id2name( &op, txn, &idcursor, id, &dn, &ndn ); if ( rc ) { rc = LDAP_OTHER; - mdb_entry_return( &op, e ); - e = NULL; + if ( e ) { + mdb_entry_return( &op, e ); + e = NULL; + } goto done; } if ( tool_base != NULL ) { -- 2.39.5