Commit 91e6c871 authored by Zackery Spytz's avatar Zackery Spytz Committed by Serhiy Storchaka

bpo-34735: Fix a memory leak in Modules/timemodule.c (GH-9418)

There was a missing PyMem_Free(format) in time_strftime().
parent c510c6b8
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;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment