From: Luke Howard Date: Wed, 1 Mar 2006 16:29:31 +0000 (+0000) Subject: slapi_ch_bvdup() should be implemented in terms of ber_dupbv() X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~159 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fa1f4d3c38b332fc5faf6d84911df2618ce9af09;p=openldap slapi_ch_bvdup() should be implemented in terms of ber_dupbv() --- diff --git a/servers/slapd/slapi/slapi_utils.c b/servers/slapd/slapi/slapi_utils.c index 39cd1ed195..554cfb2fa0 100644 --- a/servers/slapd/slapi/slapi_utils.c +++ b/servers/slapd/slapi/slapi_utils.c @@ -1041,14 +1041,7 @@ slapi_ch_array_free( char **arrayp ) struct berval * slapi_ch_bvdup(const struct berval *v) { - struct berval *bv; - - bv = (struct berval *) slapi_ch_malloc( sizeof(struct berval) ); - bv->bv_len = v->bv_len; - bv->bv_val = slapi_ch_malloc( bv->bv_len ); - AC_MEMCPY( bv->bv_val, v->bv_val, bv->bv_len ); - - return bv; + return ber_dupbv(NULL, (struct berval *)v); } struct berval **