From 37268a018e99181a1d203f0a8a6fc5c6670d09b2 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 17 Aug 2015 04:41:32 +0200 Subject: expr: immediate: fix leak in expression destroy path The verdict can be a chain string, make sure we release it when the expression is destroyed. This patch adds a new nft_free_data() for this purpose and use it from the immediate expression. Signed-off-by: Pablo Neira Ayuso --- include/data_reg.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/data_reg.h b/include/data_reg.h index cf14988..e0fdd10 100644 --- a/include/data_reg.h +++ b/include/data_reg.h @@ -28,5 +28,6 @@ int nft_data_reg_snprintf(char *buf, size_t size, union nft_data_reg *reg, struct nlattr; int nft_parse_data(union nft_data_reg *data, struct nlattr *attr, int *type); +void nft_free_verdict(union nft_data_reg *data); #endif -- cgit v1.2.3