netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nft] rule: obj_free() releases timeout state string
@ 2021-06-23 12:46 Pablo Neira Ayuso
  0 siblings, 0 replies; only message in thread
From: Pablo Neira Ayuso @ 2021-06-23 12:46 UTC (permalink / raw)
  To: netfilter-devel

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-23 12:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-23 12:46 [PATCH nft] rule: obj_free() releases timeout state string Pablo Neira Ayuso

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).