1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-02 00:22:11 +03:00

Fix two memory leaks in the smb module:

- free talloc context when cli_query_secdesc() fails

 - dispose of cli_state when python cli_state_object is garbage collected
(This used to be commit 36052f95ff)
This commit is contained in:
Tim Potter
2003-07-23 01:26:46 +00:00
parent c51ffbbdaa
commit 0c72828e3d

View File

@ -238,7 +238,8 @@ static PyObject *py_smb_query_secdesc(PyObject *self, PyObject *args,
if (cli_is_error(cli->cli)) {
PyErr_SetString(PyExc_RuntimeError, "query_secdesc failed");
return NULL;
result = NULL;
goto done;
}
if (!secdesc) {
@ -347,6 +348,11 @@ static PyMethodDef smb_methods[] = {
static void py_cli_state_dealloc(PyObject* self)
{
cli_state_object *cli = (cli_state_object *)self;
if (cli->cli)
cli_shutdown(cli->cli);
PyObject_Del(self);
}