]> git.sur5r.net Git - openldap/commitdiff
fix memory ownership
authorPierangelo Masarati <ando@openldap.org>
Sat, 27 Dec 2003 17:52:07 +0000 (17:52 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 27 Dec 2003 17:52:07 +0000 (17:52 +0000)
libraries/librewrite/var.c

index 6f8469789459bf1c01b6cce0e0db82c2c0ee016f..9a4ca786f90f1a65b03b76a7bb977493595f56a5 100644 (file)
@@ -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 );
        }