From 014afae26936d0dd884f61d1b399f104eff5a885 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 3 May 2000 10:45:36 +0000 Subject: [PATCH] setting UFN prefix to NULL should clear prefix not cause crash. --- libraries/libldap/ufn.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.39.5