From 3cf788a720b30530ca0fe86d40e2e86139e7d48c Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Thu, 14 Nov 2013 15:19:03 +0100 Subject: expr: fix leak in target and match expressions Release internal data area for match and target expressions. ==30104== 68 bytes in 1 blocks are definitely lost in loss record 1 of 1 ==30104== at 0x4C2B514: calloc (vg_replace_malloc.c:593) ==30104== by 0x400C2F: main (nft-expr_match-test.c:65) Reported-by: Ana Rey Botello Signed-off-by: Pablo Neira Ayuso --- src/expr_ops.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/expr_ops.h') diff --git a/src/expr_ops.h b/src/expr_ops.h index becc85a..26e0b82 100644 --- a/src/expr_ops.h +++ b/src/expr_ops.h @@ -23,6 +23,7 @@ struct expr_ops { const char *name; uint32_t alloc_len; int max_attr; + void (*free)(struct nft_rule_expr *e); int (*set)(struct nft_rule_expr *e, uint16_t type, const void *data, uint32_t data_len); const void *(*get)(const struct nft_rule_expr *e, uint16_t type, uint32_t *data_len); int (*parse)(struct nft_rule_expr *e, struct nlattr *attr); -- cgit v1.2.3