From: Pierangelo Masarati Date: Sat, 27 Dec 2003 17:52:07 +0000 (+0000) Subject: fix memory ownership X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~97 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=43f5b503198a10c1a211f403b0ddef6f50ccb194;p=openldap fix memory ownership --- diff --git a/libraries/librewrite/var.c b/libraries/librewrite/var.c index 6f84697894..9a4ca786f9 100644 --- a/libraries/librewrite/var.c +++ b/libraries/librewrite/var.c @@ -162,7 +162,7 @@ rewrite_var_set( assert( var->lv_value.bv_val != NULL ); free( var->lv_value.bv_val ); - var->lv_value.bv_val = ( char * )value; + var->lv_value.bv_val = strdup( value ); var->lv_value.bv_len = strlen( value ); }