From: Luke Howard Date: Tue, 21 Jan 2003 15:32:43 +0000 (+0000) Subject: Make sure slapi_valueset_add_value() copies the input value X-Git-Tag: NO_SLAP_OP_BLOCKS~553 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4fbd922a09cc810569feca9bd1f0466a7a9fd118;p=openldap Make sure slapi_valueset_add_value() copies the input value --- 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 }