summaryrefslogtreecommitdiff
path: root/variable.c
diff options
context:
space:
mode:
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/variable.c b/variable.c
index aa3abd9..8d05198 100644
--- a/variable.c
+++ b/variable.c
@@ -88,6 +88,8 @@ define_variable_in_set (name, length, value, origin, recursive, set)
than this one, don't redefine it. */
if ((int) origin >= (int) v->origin)
{
+ if (v->value != 0)
+ free (v->value);
v->value = savestring (value, strlen (value));
v->origin = origin;
v->recursive = recursive;