From 4fbd922a09cc810569feca9bd1f0466a7a9fd118 Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Tue, 21 Jan 2003 15:32:43 +0000 Subject: [PATCH] Make sure slapi_valueset_add_value() copies the input value --- servers/slapd/slapi/slapi_utils.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/servers/slapd/slapi/slapi_utils.c b/servers/slapd/slapi/slapi_utils.c index 9c9c7b8456..a59f5e1d9b 100644 --- a/servers/slapd/slapi/slapi_utils.c +++ b/servers/slapd/slapi/slapi_utils.c @@ -1995,7 +1995,10 @@ void slapi_valueset_done(Slapi_ValueSet *vs) void slapi_valueset_add_value(Slapi_ValueSet *vs, const Slapi_Value *addval) { #ifdef LDAP_SLAPI - ber_bvarray_add( vs, (Slapi_Value *)addval ); + struct berval bv; + + ber_dupbv( &bv, (Slapi_Value *)addval ); + ber_bvarray_add( vs, &bv ); #endif } -- 2.39.5