bpo-34735: Fix a memory leak in Modules/timemodule.c (GH-9418)
There was a missing PyMem_Free(format) in time_strftime().
This commit is contained in:
parent
c510c6b8b6
commit
91e6c8717b
|
@ -0,0 +1 @@
|
|||
Fix a memory leak in Modules/timemodule.c. Patch by Zackery Spytz.
|
|
@ -801,6 +801,7 @@ time_strftime(PyObject *self, PyObject *args)
|
|||
if (outbuf[1] == L'y' && buf.tm_year < 0) {
|
||||
PyErr_SetString(PyExc_ValueError,
|
||||
"format %y requires year >= 1900 on AIX");
|
||||
PyMem_Free(format);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue