Skip to content

Commit

Permalink
python: Fix leak
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Sutton <[email protected]>
Reviewed-by: Andrew Bartlett <[email protected]>
  • Loading branch information
jsutton24 authored and abartlet committed Aug 8, 2023
1 parent d0efff6 commit b270333
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions python/modules.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ char **PyList_AsStringList(TALLOC_CTX *mem_ctx, PyObject *list,
PyObject *item = PyList_GetItem(list, i);
if (!PyUnicode_Check(item)) {
PyErr_Format(PyExc_TypeError, "%s should be strings", paramname);
talloc_free(ret);
return NULL;
}
value = PyUnicode_AsUTF8AndSize(item, &size);
Expand Down

0 comments on commit b270333

Please sign in to comment.