From: Kurt Zeilenga Date: Wed, 3 May 2000 10:45:36 +0000 (+0000) Subject: setting UFN prefix to NULL should clear prefix not cause crash. X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~3051 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=014afae26936d0dd884f61d1b399f104eff5a885;p=openldap setting UFN prefix to NULL should clear prefix not cause crash. --- diff --git a/libraries/libldap/ufn.c b/libraries/libldap/ufn.c index 9d215cdec9..2b8f44a6f4 100644 --- a/libraries/libldap/ufn.c +++ b/libraries/libldap/ufn.c @@ -478,7 +478,8 @@ ldap_ufn_setprefix( LDAP *ld, LDAP_CONST char *prefix ) if ( ld->ld_ufnprefix != NULL ) LDAP_FREE( ld->ld_ufnprefix ); - ld->ld_ufnprefix = LDAP_STRDUP( prefix ); + ld->ld_ufnprefix = prefix == NULL + ? NULL : LDAP_STRDUP( prefix ); } int