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 4a7f638 commit 9e90313Copy full SHA for 9e90313
Modules/getpath.c
@@ -262,6 +262,10 @@ getpath_joinpath(PyObject *Py_UNUSED(self), PyObject *args)
262
}
263
/* Convert all parts to wchar and accumulate max final length */
264
wchar_t **parts = (wchar_t **)PyMem_Malloc(n * sizeof(wchar_t *));
265
+ if (parts == NULL) {
266
+ PyErr_NoMemory();
267
+ return NULL;
268
+ }
269
memset(parts, 0, n * sizeof(wchar_t *));
270
Py_ssize_t cchFinal = 0;
271
Py_ssize_t first = 0;
0 commit comments