From: Howard Chu Date: Wed, 7 Mar 2012 06:15:51 +0000 (-0800) Subject: ITS#7190 don't crash in slapcat on NULL entry X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d0bcaee0f329d232fd9354dfbd501311070fa9b7;p=openldap ITS#7190 don't crash in slapcat on NULL entry --- 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 ) {