diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2023-11-22 20:35:07 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2023-11-22 22:00:44 +0100 |
commit | faa6908fad6053ae9549c45b88d0402cc69cf1ed (patch) | |
tree | c65df90f6d4f7a597625654b1b1b73edb2a45774 /src/evaluate.c | |
parent | 7a6089a400a573b9a4fd92f29c00a6be7b8ef269 (diff) |
evaluate: clone unary expression datatype to deal with dynamic datatype
When allocating a unary expression, clone the datatype to deal with
dynamic datatypes.
Fixes: 6b01bb9ff798 ("datatype: concat expression only releases dynamically allocated datatype")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/evaluate.c')
-rw-r--r-- | src/evaluate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/evaluate.c b/src/evaluate.c index bcf83d80..2ead0347 100644 --- a/src/evaluate.c +++ b/src/evaluate.c @@ -1245,7 +1245,7 @@ static int expr_evaluate_unary(struct eval_ctx *ctx, struct expr **expr) BUG("invalid unary operation %u\n", unary->op); } - unary->dtype = arg->dtype; + unary->dtype = datatype_clone(arg->dtype); unary->byteorder = byteorder; unary->len = arg->len; return 0; |