1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

pygpo: Fix CID 1422263 Resource leak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Volker Lendecke 2018-03-28 15:49:30 -05:00 committed by Jeremy Allison
parent 54fc90025b
commit 5b52c308af

View File

@ -264,12 +264,12 @@ static PyObject* py_ads_connect(ADS *self)
Py_RETURN_FALSE;
}
self->ads_ptr->auth.password = smb_xstrdup(passwd);
SAFE_FREE(passwd);
self->ads_ptr->auth.realm =
smb_xstrdup(self->ads_ptr->server.realm);
if (!strupper_m(self->ads_ptr->auth.realm)) {
PyErr_SetString(PyExc_SystemError, "Failed to strdup");
TALLOC_FREE(frame);
SAFE_FREE(passwd);
Py_RETURN_FALSE;
}
@ -278,7 +278,6 @@ static PyObject* py_ads_connect(ADS *self)
PyErr_SetString(PyExc_SystemError,
"ads_connect() failed");
TALLOC_FREE(frame);
SAFE_FREE(passwd);
Py_RETURN_FALSE;
}
}