summaryrefslogtreecommitdiffstats
path: root/src/evaluate.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/evaluate.c')
-rw-r--r--src/evaluate.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/evaluate.c b/src/evaluate.c
index e890585e..6c29579f 100644
--- a/src/evaluate.c
+++ b/src/evaluate.c
@@ -2057,9 +2057,11 @@ static int expr_evaluate_map(struct eval_ctx *ctx, struct expr **expr)
ctx->ectx.len, NULL);
}
- if (!ectx.dtype)
+ if (!ectx.dtype) {
+ expr_free(key);
return expr_error(ctx->msgs, map,
"Implicit map expression without known datatype");
+ }
if (ectx.dtype->type == TYPE_VERDICT) {
data = verdict_expr_alloc(&netlink_location, 0, NULL);