From fa0f0c210763e0db5d4c6947840873998fd6b2eb Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 13 Mar 2011 14:44:28 +0100 Subject: [PATCH] s4:pyrpc: fix memory leaks in error pathes metze --- source4/librpc/rpc/pyrpc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source4/librpc/rpc/pyrpc.c b/source4/librpc/rpc/pyrpc.c index ffd2376c7497..400f61b88243 100644 --- a/source4/librpc/rpc/pyrpc.c +++ b/source4/librpc/rpc/pyrpc.c @@ -150,6 +150,7 @@ static PyObject *py_iface_request(PyObject *self, PyObject *args, PyObject *kwar if (!PyArg_ParseTupleAndKeywords(args, kwargs, "is#|O:request", discard_const_p(char *, kwnames), &opnum, &in_data, &in_length, &object)) { + talloc_free(mem_ctx); return NULL; } @@ -159,6 +160,7 @@ static PyObject *py_iface_request(PyObject *self, PyObject *args, PyObject *kwar ZERO_STRUCT(data_out); if (object != NULL && !PyString_AsGUID(object, &object_guid)) { + talloc_free(mem_ctx); return NULL; } -- 2.34.1