assert(result);
if (!obj)
- goto cleanup;
+ return 0;
if (obj == Py_None) {
*result = NULL;
len = PySequence_Length(obj);
*result = new0(char*, len + 1);
+ if (!*result) {
+ set_error(-ENOMEM, NULL, NULL);
+ return 0;
+ }
for (i = 0; i < len; i++) {
PyObject *item;
char **files = NULL;
static const char* const kwlist[] = {"flags", "path", "files", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, keywds, "|izO&", (char**) kwlist,
+ if (!PyArg_ParseTupleAndKeywords(args, keywds, "|izO&:__init__", (char**) kwlist,
&flags, &path, strv_converter, &files))
return -1;