Skip to content
Snippets Groups Projects
Commit d59de0c5 authored by Hallvard Furuseth's avatar Hallvard Furuseth
Browse files

Plug some memory leak

parent 4bb44991
No related branches found
No related tags found
No related merge requests found
......@@ -414,7 +414,7 @@ subtree_candidates(
)
{
struct ldbminfo *li = (struct ldbminfo *) be->be_private;
Filter *f;
Filter *f, **filterarg_ptr;
IDList *candidates;
Debug(LDAP_DEBUG_TRACE, "subtree_candidates: base: %s\n",
......@@ -454,7 +454,8 @@ subtree_candidates(
/* Patch to use normalized uppercase */
f->f_or->f_avvalue.bv_val = ch_strdup( "REFERRAL" );
f->f_or->f_avvalue.bv_len = strlen( "REFERRAL" );
f->f_or->f_next = filter;
filterarg_ptr = &f->f_or->f_next;
*filterarg_ptr = filter;
filter = f;
if ( ! be_issuffix( be, base ) ) {
......@@ -477,7 +478,7 @@ subtree_candidates(
/* free up just the parts we allocated above */
if ( f != NULL ) {
f->f_and->f_next = NULL;
*filterarg_ptr = NULL;
filter_free( f );
}
......
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