We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e686df commit 214ac16Copy full SHA for 214ac16
Modules/getpath.c
@@ -265,6 +265,10 @@ getpath_joinpath(PyObject *Py_UNUSED(self), PyObject *args)
265
}
266
/* Convert all parts to wchar and accumulate max final length */
267
wchar_t **parts = (wchar_t **)PyMem_Malloc(n * sizeof(wchar_t *));
268
+ if (parts == NULL) {
269
+ PyErr_NoMemory();
270
+ return NULL;
271
+ }
272
memset(parts, 0, n * sizeof(wchar_t *));
273
Py_ssize_t cchFinal = 0;
274
Py_ssize_t first = 0;
0 commit comments