libnetfilter_cthelper/0004-src-fix-use-after-free.patch

36 lines
1023 B
Diff

From 9fe9ae5010f159539b4fc51890b9f218422ee8d8 Mon Sep 17 00:00:00 2001
From: Christopher Horler <cshorler@googlemail.com>
Date: Mon, 8 Dec 2014 20:04:31 +0000
Subject: [PATCH] src: fix use after free
Fixes: https://bugzilla.netfilter.org/show_bug.cgi?id=990
Signed-off-by: Christopher Horler <cshorler@googlemail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
(cherry picked from commit d48012fa7718195e3f897b01a36e4ba249aa6dfc)
Signed-off-by: Phil Sutter <psutter@redhat.com>
---
src/libnetfilter_cthelper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libnetfilter_cthelper.c b/src/libnetfilter_cthelper.c
index 297887040b20c..f8f58e6c9c5e8 100644
--- a/src/libnetfilter_cthelper.c
+++ b/src/libnetfilter_cthelper.c
@@ -113,11 +113,11 @@ void nfct_helper_free(struct nfct_helper *h)
{
int i;
- free(h);
for (i=0; i<NF_CT_HELPER_CLASS_MAX; i++) {
if (h->expect_policy[i])
free(h->expect_policy[i]);
}
+ free(h);
}
EXPORT_SYMBOL(nfct_helper_free);
--
2.23.0