Memory leaks: Values from ldap_dn2ufn and ldap_get_dn were not freed.

This commit is contained in:
Hallvard Furuseth 1998-11-11 21:27:21 +00:00
parent f0688d71a1
commit ede86e4da8

View File

@ -182,11 +182,13 @@ according to the IAFA services template." );
ldap_value_free( values );
} else {
#endif
value = strdup( ldap_dn2ufn( ldap_get_dn( ld, result ) ) );
value = ldap_dn2ufn( ptr = ldap_get_dn( ld, result ) );
free( ptr );
if ( (ptr = index( value, ',' )) != NULL )
*ptr = '\0';
printFormatted( lineLength, FALSE, stdout, "%-19s %s",
"Contact:", value );
free( value );
#if defined(UOFA)
}
#endif