diff --git a/tests/progs/slapd-common.c b/tests/progs/slapd-common.c index d7ab921a24..bed9d05c25 100644 --- a/tests/progs/slapd-common.c +++ b/tests/progs/slapd-common.c @@ -73,7 +73,9 @@ tester_ldap_error( LDAP *ld, const char *fname ) ldap_get_option( ld, LDAP_OPT_MATCHED_DN, (void *)&text ); if ( text != NULL ) { - fprintf( stderr, "\tmatched: %s\n", text ); + if ( text[ 0 ] != '\0' ) { + fprintf( stderr, "\tmatched: %s\n", text ); + } ldap_memfree( text ); text = NULL; }