From: Volker Lendecke Date: Mon, 20 Aug 2012 11:43:41 +0000 (+0200) Subject: s3: Fix memleaks in pylibsmb.c X-Git-Tag: samba-4.0.0rc1~240 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2fe08c886ae60c0affae0166ce1cdab1593bab3e;p=thirdparty%2Fsamba.git s3: Fix memleaks in pylibsmb.c Cut&Paste errors from the read&x routine Signed-off-by: Jeremy Allison --- diff --git a/source3/libsmb/pylibsmb.c b/source3/libsmb/pylibsmb.c index be04e5b7db2..d8e64b35682 100644 --- a/source3/libsmb/pylibsmb.c +++ b/source3/libsmb/pylibsmb.c @@ -577,9 +577,9 @@ static PyObject *py_cli_ftruncate(struct py_cli_state *self, PyObject *args, return NULL; } status = cli_ftruncate_recv(req); + TALLOC_FREE(req); if (!NT_STATUS_IS_OK(status)) { - TALLOC_FREE(req); PyErr_SetNTSTATUS(status); return NULL; } @@ -609,9 +609,9 @@ static PyObject *py_cli_delete_on_close(struct py_cli_state *self, return NULL; } status = cli_nt_delete_on_close_recv(req); + TALLOC_FREE(req); if (!NT_STATUS_IS_OK(status)) { - TALLOC_FREE(req); PyErr_SetNTSTATUS(status); return NULL; }