diff options
Diffstat (limited to 'src/evaluate.c')
-rw-r--r-- | src/evaluate.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/evaluate.c b/src/evaluate.c index a84e9609..a9822ebc 100644 --- a/src/evaluate.c +++ b/src/evaluate.c @@ -2017,8 +2017,10 @@ static int expr_evaluate_variable(struct eval_ctx *ctx, struct expr **exprp) { struct expr *new = expr_clone((*exprp)->sym->expr); - if (expr_evaluate(ctx, &new) < 0) + if (expr_evaluate(ctx, &new) < 0) { + expr_free(new); return -1; + } expr_free(*exprp); *exprp = new; |