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