mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
ITS#9214 slapd-mdb: plug cursor leak in dnSuperiorMatch filter
This commit is contained in:
parent
f747d61922
commit
a5e17673a6
@ -485,10 +485,8 @@ mdb_dn2sups(
|
|||||||
data.mv_data = d;
|
data.mv_data = d;
|
||||||
rc = mdb_cursor_get( cursor, &key, &data, MDB_GET_BOTH );
|
rc = mdb_cursor_get( cursor, &key, &data, MDB_GET_BOTH );
|
||||||
op->o_tmpfree( d, op->o_tmpmemctx );
|
op->o_tmpfree( d, op->o_tmpmemctx );
|
||||||
if ( rc ) {
|
if ( rc )
|
||||||
mdb_cursor_close( cursor );
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
ptr = (char *) data.mv_data + data.mv_size - 2*sizeof(ID);
|
ptr = (char *) data.mv_data + data.mv_size - 2*sizeof(ID);
|
||||||
memcpy( &nid, ptr, sizeof(ID));
|
memcpy( &nid, ptr, sizeof(ID));
|
||||||
|
|
||||||
@ -507,7 +505,7 @@ mdb_dn2sups(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mdb_cursor_close( cursor );
|
||||||
done:
|
done:
|
||||||
if( rc != 0 ) {
|
if( rc != 0 ) {
|
||||||
Debug( LDAP_DEBUG_TRACE, "<= mdb_dn2sups: get failed: %s (%d)\n",
|
Debug( LDAP_DEBUG_TRACE, "<= mdb_dn2sups: get failed: %s (%d)\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user