From fa1f4d3c38b332fc5faf6d84911df2618ce9af09 Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Wed, 1 Mar 2006 16:29:31 +0000 Subject: [PATCH] slapi_ch_bvdup() should be implemented in terms of ber_dupbv() --- servers/slapd/slapi/slapi_utils.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) 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 ** -- 2.39.5