]> git.sur5r.net Git - openldap/commitdiff
slapi_ch_bvdup() should be implemented in terms of ber_dupbv()
authorLuke Howard <lukeh@openldap.org>
Wed, 1 Mar 2006 16:29:31 +0000 (16:29 +0000)
committerLuke Howard <lukeh@openldap.org>
Wed, 1 Mar 2006 16:29:31 +0000 (16:29 +0000)
servers/slapd/slapi/slapi_utils.c

index 39cd1ed19539dc74407948667628ba43fcb64e15..554cfb2fa0f7f3d1f69e053a81baa89f7afbe8c2 100644 (file)
@@ -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 **