Skip to content
Snippets Groups Projects
Commit a253df31 authored by Howard Chu's avatar Howard Chu
Browse files

More for ITS#4638, double-free fix from HEAD

parent ee6937e9
No related branches found
Tags OPENLDAP_REL_ENG_2_3_32
No related merge requests found
......@@ -150,6 +150,7 @@ ldap_back_search(
msgid;
struct berval match = BER_BVNULL,
filter = BER_BVNULL;
int free_filter = 0;
int i;
char **attrs = NULL;
int freetext = 0;
......@@ -237,6 +238,7 @@ retry:
case LDAP_FILTER_ERROR:
if ( ldap_back_munge_filter( op, &filter ) ) {
free_filter = 1;
goto retry;
}
......@@ -495,7 +497,7 @@ finish:;
rs->sr_matched = save_matched;
}
if ( !BER_BVISNULL( &filter ) && filter.bv_val != op->ors_filterstr.bv_val ) {
if ( free_filter ) {
op->o_tmpfree( filter.bv_val, op->o_tmpmemctx );
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment