diff options
author | Andrew Walker <awalker@ixsystems.com> | 2020-11-02 16:42:29 -0500 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2020-11-06 04:58:31 +0000 |
commit | c2fcd83ed7b5cf54b2c5de296a4126ea4e9e155e (patch) | |
tree | 1a61dc4fedef393ac35a7380452ff45d69646e26 | |
parent | ca07dc775cbf0d6736783ced8d0dfb6ddec8520f (diff) | |
download | samba-c2fcd83ed7b5cf54b2c5de296a4126ea4e9e155e.tar.gz |
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
-rw-r--r-- | source4/libnet/py_net.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/libnet/py_net.c b/source4/libnet/py_net.c index 25a25b0cfd1..df9280d8c18 100644 --- a/source4/libnet/py_net.c +++ b/source4/libnet/py_net.c @@ -843,7 +843,7 @@ static PyMethodDef net_obj_methods[] = { static void py_net_dealloc(py_net_Object *self) { - talloc_free(self->mem_ctx); + talloc_free(self->ev); PyObject_Del(self); } |