Setting UFN prefix to NULL should clear prefix, not cause crash

This commit is contained in:
Kurt Zeilenga 2000-05-03 10:51:57 +00:00
parent 0bbeef6032
commit 1d06783128
2 changed files with 3 additions and 1 deletions

View file

@ -7,6 +7,7 @@ Changes included in OpenLDAP 1.2.11 Release Engineering
Fix slurpd to properly restart in oneshot mode, and to report a
non-zero number of items to process with only one replica.
Fix strdup use in libldap/request.c
Fix NULL prefix bug in libldap/ufn.c
Changes included in OpenLDAP 1.2.10
CVS Tag: OPENLDAP_REL_ENG_1_2_10

View file

@ -476,7 +476,8 @@ ldap_ufn_setprefix( LDAP *ld, char *prefix )
if ( ld->ld_ufnprefix != NULL )
free( ld->ld_ufnprefix );
ld->ld_ufnprefix = ldap_strdup( prefix );
ld->ld_ufnprefix = prefix == NULL
? NULL : ldap_strdup( prefix );
}
int