From 76336fa21b5d286c566cb43a14ea937bb5f78e65 Mon Sep 17 00:00:00 2001 From: rlar Date: Thu, 5 Apr 2012 21:25:04 +0200 Subject: [PATCH] fix memory leak in cp_vset() --- src/frontend/variable.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/frontend/variable.c b/src/frontend/variable.c index 89d2e3420..cfbed0d24 100644 --- a/src/frontend/variable.c +++ b/src/frontend/variable.c @@ -119,6 +119,7 @@ cp_vset(char *varname, enum cp_types type, void *value) tfree(v->va_name); tfree(v); } + tfree(copyvarname); return; } else v->va_bool = TRUE; @@ -144,6 +145,7 @@ cp_vset(char *varname, enum cp_types type, void *value) fprintf(cp_err, "cp_vset: Internal Error: bad variable type %d.\n", type); + tfree(copyvarname); return; } v->va_type = type;