From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Subject: [PATCH nft] rule: obj_free() releases timeout state string
Date: Wed, 23 Jun 2021 14:46:11 +0200 [thread overview]
Message-ID: <20210623124611.2663-1-pablo@netfilter.org> (raw)
Missing free() on the timeout state string on object release.
Fixes: 7a0e26723496 ("rule: memleak of list of timeout policies"
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
src/rule.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/rule.c b/src/rule.c
index 10569aa7875a..877eae3cd85d 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -1714,6 +1714,7 @@ void obj_free(struct obj *obj)
list_for_each_entry_safe(ts, next, &obj->ct_timeout.timeout_list, head) {
list_del(&ts->head);
+ xfree(ts->timeout_str);
xfree(ts);
}
}
--
2.20.1
reply other threads:[~2021-06-23 12:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210623124611.2663-1-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).