mirror of
https://github.com/samba-team/samba.git
synced 2025-12-16 00:23:52 +03:00
python: Fix leak
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
committed by
Andrew Bartlett
parent
d0efff68ce
commit
b270333fe4
@@ -93,6 +93,7 @@ char **PyList_AsStringList(TALLOC_CTX *mem_ctx, PyObject *list,
|
|||||||
PyObject *item = PyList_GetItem(list, i);
|
PyObject *item = PyList_GetItem(list, i);
|
||||||
if (!PyUnicode_Check(item)) {
|
if (!PyUnicode_Check(item)) {
|
||||||
PyErr_Format(PyExc_TypeError, "%s should be strings", paramname);
|
PyErr_Format(PyExc_TypeError, "%s should be strings", paramname);
|
||||||
|
talloc_free(ret);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
value = PyUnicode_AsUTF8AndSize(item, &size);
|
value = PyUnicode_AsUTF8AndSize(item, &size);
|
||||||
|
|||||||
Reference in New Issue
Block a user