mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-18 18:18:06 -05:00
Plug memleak
This commit is contained in:
parent
bd5c7b74fe
commit
44c291226d
2 changed files with 11 additions and 4 deletions
|
|
@ -242,7 +242,8 @@ int mdb_entry_get(
|
|||
Debug( LDAP_DEBUG_ACL,
|
||||
"=> mdb_entry_get: cannot find entry: \"%s\"\n",
|
||||
ndn->bv_val, 0, 0 );
|
||||
return LDAP_NO_SUCH_OBJECT;
|
||||
rc = LDAP_NO_SUCH_OBJECT;
|
||||
goto return_results;
|
||||
}
|
||||
|
||||
Debug( LDAP_DEBUG_ACL,
|
||||
|
|
@ -269,10 +270,16 @@ int mdb_entry_get(
|
|||
return_results:
|
||||
if( rc != LDAP_SUCCESS ) {
|
||||
/* free entry */
|
||||
mdb_entry_return( e );
|
||||
if ( e )
|
||||
mdb_entry_return( e );
|
||||
|
||||
if (moi->moi_ref == 1) {
|
||||
LDAP_SLIST_REMOVE( &op->o_extra, &moi->moi_oe, OpExtra, oe_next );
|
||||
mdb_txn_reset( txn );
|
||||
op->o_tmpfree( moi, op->o_tmpmemctx );
|
||||
}
|
||||
} else {
|
||||
*ent = entry_dup( e );
|
||||
*ent = e;
|
||||
}
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE,
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit e4ff4cdcd26f5c547ccb98caabc97edb43d3d09a
|
||||
Subproject commit 7a48f12cbbbca1c5781148196e6c621bc776f602
|
||||
Loading…
Reference in a new issue