mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-04-06 15:00:40 +08:00
free -> ldap_memfree. Remove spurious strdup.
This commit is contained in:
parent
7927ffe7f3
commit
02d668d8a8
@ -183,12 +183,12 @@ according to the IAFA services template." );
|
||||
} 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
|
||||
|
@ -48,17 +48,17 @@ LDAPMessage *entry;
|
||||
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++ )
|
||||
@ -256,7 +256,7 @@ char *dn, *attributes[];
|
||||
printFormatted( lineLength, FALSE, stdout, " %-19s \"%s\"",
|
||||
"Handle", dn );
|
||||
|
||||
free( ufn );
|
||||
ldap_memfree( ufn );
|
||||
}
|
||||
|
||||
char *attributeLabel( attribute )
|
||||
|
@ -220,7 +220,7 @@ Please try again later." );
|
||||
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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user