}
dn = ldap_get_dn(ld, ldap_first_entry(ld, mp));
rdns = ldap_explode_dn(dn, TRUE);
- Free(dn);
+ ldap_memfree(dn);
if (verbose) {
printf("\n Editing directory entry \"%s\"...\n", *rdns);
}
} else if (matches == 1) {
dn = ldap_get_dn(ld, ldap_first_entry(ld, res));
rc = ldap_search_s(ld, dn, LDAP_SCOPE_BASE, "objectClass=*", read_attrs, FALSE, &res);
- Free(dn);
+ ldap_memfree(dn);
if (rc != LDAP_SUCCESS) {
int ld_errno = 0;
ldap_get_option(ld, LDAP_OPT_ERROR_NUMBER, &ld_errno);
fetch_buffer(response, sizeof(response), stdin);
if ((response[0] == 'n') || (response[0] == 'N'))
{
- Free(dn);
+ ldap_memfree(dn);
return(NULL);
}
}
ldap_msgfree(res);
res = NULL;
}
- Free(dn);
+ ldap_memfree(dn);
return(res);
}
else if (matches > 0) {
/* lookup the groups belonging to this person */
sprintf(filter, "owner=%s", dn);
- Free(dn);
+ ldap_memfree(dn);
search_attrs[0] = "cn";
search_attrs[1] = NULL;
if ((rc = ldap_search_s(ld, UD_WHERE_ALL_GROUPS_LIVE, LDAP_SCOPE_SUBTREE,
/* lookup the groups belonging to this person */
sprintf(filter, "member=%s", dn);
- Free(dn);
+ ldap_memfree(dn);
search_attrs[0] = "cn";
search_attrs[1] = NULL;
ldap_msgfree(mp);
if (j == 0) {
(void) ldap_msgfree(mp);
for (i = 0; i < matches; i++)
- Free(choices[i]);
+ ldap_memfree(choices[i]);
return;
}
if ((j < 1) || (j >= i))
printbase(output_string, *base);
(void) ldap_msgfree(mp);
for (i = 0; choices[i] != NULL; i++)
- Free(choices[i]);
+ ldap_memfree(choices[i]);
return;
}
}
parse_answer(mp);
(void) ldap_msgfree(mp);
}
- (void) Free(dn);
+ ldap_memfree(dn);
ldap_value_free(rdns);
return;
}
}
tmp = ldap_get_dn(ld, elmp);
strcpy(buffer, tmp);
- Free(tmp);
+ ldap_memfree(tmp);
(void) ldap_msgfree(lmp);
break;
}
printf(" Clearing entry \"%s\"\n", Entry.name);
#endif
if (Entry.DN != NULL)
- Free(Entry.DN);
+ ldap_memfree(Entry.DN);
if (Entry.name != NULL)
Free(Entry.name);
Entry.may_join = FALSE;
void
Free( void *ptr )
{
-#if 0
- if (free(ptr) < 0) {
- perror("free");
- exit(-1);
- /*NOTREACHED*/
- }
-#else
free(ptr);
-#endif
- return;
}
char *