} else {
#endif
value = ldap_dn2ufn( ptr = ldap_get_dn( ld, result ) );
- free( ptr );
+ ldap_memfree( ptr );
if ( (ptr = index( value, ',' )) != NULL )
*ptr = '\0';
printFormatted( lineLength, FALSE, stdout, "%-19s %s",
"Contact:", value );
- free( value );
+ ldap_memfree( value );
#if defined(UOFA)
}
#endif
int i;
template = NULL;
- dn = strdup( ldap_get_dn( ld, entry ) );
+ dn = ldap_get_dn( ld, entry );
ldap_search_s( ld, dn, LDAP_SCOPE_BASE, "objectclass=*", objectClass,
0, &result );
if ( ld->ld_errno != LDAP_SUCCESS ) {
printFormatted( lineLength, TRUE, stdout,
"Read on object \"%s\" failed, %s",
dn, ldap_err2string( ld->ld_errno ) );
- free( dn );
+ ldap_memfree( dn );
return;
} else
- free( dn );
+ ldap_memfree( dn );
if ( ( val = ldap_get_values( ld, result, "objectClass" ) ) == NULL )
return;
for ( i = 0 ; val[i] != NULL ; i++ )
printFormatted( lineLength, FALSE, stdout, " %-19s \"%s\"",
"Handle", dn );
- free( ufn );
+ ldap_memfree( ufn );
}
char *attributeLabel( attribute )
exit( 1 );
}
entry = ldap_first_entry( ld, result );
- organisation = strdup( ldap_dn2ufn( ldap_get_dn( ld, entry ) ) );
+ organisation = ldap_dn2ufn( ldap_get_dn( ld, entry ) );
category = ldap_get_values( ld, entry, "businessCategory" );
printFormatted( lineLength, FALSE, stdout,