]> git.sur5r.net Git - openldap/commitdiff
setting UFN prefix to NULL should clear prefix not cause crash.
authorKurt Zeilenga <kurt@openldap.org>
Wed, 3 May 2000 10:45:36 +0000 (10:45 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 3 May 2000 10:45:36 +0000 (10:45 +0000)
libraries/libldap/ufn.c

index 9d215cdec999aa45eb2333482374cbee70225c60..2b8f44a6f40010ddb9520679fbe2858df8290620 100644 (file)
@@ -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