oldDN, newDN, 0 );
send_ldap_result( conn, op, LDAP_ALIAS_PROBLEM, "",
"Dangling Alias" );
+
+ if(matched != NULL) free(matched);
}
free (newDN);
free (oldDN);
if ((eNew = derefAlias_r( be, conn, op, eMatched )) == NULL) {
free (matched);
free (newDN);
+ free (remainder);
break; /* no associated entry, dont deref */
}
else {
/* newDN same as old so not an alias, no need to go further */
free (newDN);
free (matched);
+ free (remainder);
break;
}
strcat (newDN, eMatched->e_dn);
Debug( LDAP_DEBUG_TRACE, "<= expanded to %s\n", newDN, 0, 0 );
+ free (remainder);
+
/* free reader lock */
cache_return_entry_r(&li->li_cache, eNew);
}
cache_return_entry_r(&li->li_cache, eMatched);
}
else {
+ if(submatch != NULL) free(submatch);
break; /* there was no entry for the matched part */
}
}
Debug( LDAP_DEBUG_TRACE, "<= returning deref DN of %s\n", newDN, 0, 0 );
+ free(matched);
+
return newDN;
}