From: Jong Hyuk Choi Date: Mon, 20 Sep 2004 19:44:05 +0000 (+0000) Subject: misc bug fix for @oc support X-Git-Tag: OPENLDAP_REL_ENG_2_3_0ALPHA~515 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=34280359b5e3f96e404ace61889b2efb563a9f92;p=openldap misc bug fix for @oc support --- diff --git a/servers/slapd/config.c b/servers/slapd/config.c index c864bb547e..0839ecc6e7 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -2734,26 +2734,26 @@ str2ocs( ObjectClass ***out, char *in, const char *brkstr ) slap_str2clist( &clist, in, brkstr ); for ( i = 0; clist && clist[i]; i++ ) { - struct berval ocbv; if (*clist[i] == '@' ) { + struct berval ocbv; ber_str2bv( clist[i]+1, strlen(clist[i]+1), 1, &ocbv ); oc = oc_bvfind( &ocbv ); if ( oc ) { k++; } + ch_free( ocbv.bv_val ); } - ch_free( ocbv.bv_val ); } *out = ch_realloc( *out, (k + 1) * sizeof( ObjectClass *)); for ( i = 0; clist && clist[i]; i++ ) { - struct berval ocbv; if (*clist[i] == '@' ) { + struct berval ocbv; ber_str2bv( clist[i]+1, strlen(clist[i]+1), 1, &ocbv ); (*out)[i] = oc_bvfind( &ocbv ); + ch_free( ocbv.bv_val ); } - ch_free( ocbv.bv_val ); } (*out)[i] = NULL;