diff --git a/clients/gopher/go500.c b/clients/gopher/go500.c index e93b5504e8..367ecaebfe 100644 --- a/clients/gopher/go500.c +++ b/clients/gopher/go500.c @@ -426,8 +426,10 @@ int s; fprintf( fp, ".\r\n" ); rewind(fp); - if ( ld ) + + if ( ld == NULL) { ldap_unbind( ld ); + } exit( 1 ); /* NOT REACHED */