]> git.ipfire.org Git - thirdparty/samba.git/commit
s4:libnet:py_net - free event context in dealloc fn
authorAndrew Walker <awalker@ixsystems.com>
Mon, 2 Nov 2020 21:42:29 +0000 (16:42 -0500)
committerJeremy Allison <jra@samba.org>
Fri, 6 Nov 2020 04:58:31 +0000 (04:58 +0000)
commitc2fcd83ed7b5cf54b2c5de296a4126ea4e9e155e
tree1a61dc4fedef393ac35a7380452ff45d69646e26
parentca07dc775cbf0d6736783ced8d0dfb6ddec8520f
s4:libnet:py_net - free event context in dealloc fn

Creation of a new Net() object initializes an event context under
a NULL talloc context and then creates a new talloc context as a
child of the event context. The deallocation function for the
net object only frees the child and not the parent. This leaks an
fd for the tevent context and associated memory.

Signed-off-by: Andrew Walker <awalker@ixsystems.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Nov  6 04:58:31 UTC 2020 on sn-devel-184
source4/libnet/py_net.c