]> git.feebdaed.xyz Git - 0xmirror/iptables.git/commit
libxtables: Fix memleak of matches' udata
authorPhil Sutter <phil@nwl.cc>
Wed, 31 Jan 2024 13:58:17 +0000 (14:58 +0100)
committerPhil Sutter <phil@nwl.cc>
Thu, 1 Feb 2024 13:51:30 +0000 (14:51 +0100)
commite7366db80740d34d2fe4ba8d12ef86a423e66280
tree9a5a951efb7f0c438563d363376e3cfc2ffcfb07
parent2026b08bce7fe87b5964f7912e1eef30f04922c1
libxtables: Fix memleak of matches' udata

If the extension specifies a non-zero udata_size, field 'udata' points
to an allocated buffer which needs to be freed upon extension deinit.

Interestingly, this bug was identified by ASAN and missed by valgrind.

Fixes: 2dba676b68ef8 ("extensions: support for per-extension instance "global" variable space")
Signed-off-by: Phil Sutter <phil@nwl.cc>
libxtables/xtables.c