mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-02 20:10:11 -05:00
ITS#7636 slapi: don't free filterstr if filter didn't change
This commit is contained in:
parent
60720f5d9c
commit
9b60fa9bb3
1 changed files with 5 additions and 2 deletions
|
|
@ -296,6 +296,7 @@ static int
|
|||
slapi_op_search_callback( Operation *op, SlapReply *rs, int prc )
|
||||
{
|
||||
Slapi_PBlock *pb = SLAPI_OPERATION_PBLOCK( op );
|
||||
Filter *f = op->ors_filter;
|
||||
|
||||
/* check preoperation result code */
|
||||
if ( prc < 0 ) {
|
||||
|
|
@ -310,8 +311,10 @@ slapi_op_search_callback( Operation *op, SlapReply *rs, int prc )
|
|||
* The plugin can set the SLAPI_SEARCH_FILTER.
|
||||
* SLAPI_SEARCH_STRFILER is not normative.
|
||||
*/
|
||||
op->o_tmpfree( op->ors_filterstr.bv_val, op->o_tmpmemctx );
|
||||
filter2bv_x( op, op->ors_filter, &op->ors_filterstr );
|
||||
if (f != op->ors_filter) {
|
||||
op->o_tmpfree( op->ors_filterstr.bv_val, op->o_tmpmemctx );
|
||||
filter2bv_x( op, op->ors_filter, &op->ors_filterstr );
|
||||
}
|
||||
}
|
||||
|
||||
return LDAP_SUCCESS;
|
||||
|
|
|
|||
Loading…
Reference in a new issue