mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-30 13:30:57 +08:00
ITS#7915 fix memory leaks in previous patch
This commit is contained in:
parent
4f66cfa1b4
commit
c1f04881be
@ -272,9 +272,11 @@ int mdb_entry_release(
|
||||
/* slapMode : SLAP_SERVER_MODE, SLAP_TOOL_MODE,
|
||||
SLAP_TRUNCATE_MODE, SLAP_UNDEFINED_MODE */
|
||||
|
||||
int release = 1;
|
||||
if ( slapMode & SLAP_SERVER_MODE ) {
|
||||
OpExtra *oex;
|
||||
LDAP_SLIST_FOREACH( oex, &op->o_extra, oe_next ) {
|
||||
release = 0;
|
||||
if ( oex->oe_key == mdb ) {
|
||||
mdb_entry_return( op, e );
|
||||
moi = (mdb_op_info *)oex;
|
||||
@ -291,10 +293,11 @@ int mdb_entry_release(
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mdb_entry_return( op, e );
|
||||
}
|
||||
|
||||
if (release)
|
||||
mdb_entry_return( op, e );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user