From 43f5b503198a10c1a211f403b0ddef6f50ccb194 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sat, 27 Dec 2003 17:52:07 +0000 Subject: [PATCH] fix memory ownership --- libraries/librewrite/var.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ); } -- 2.39.5