Unverified Kaydet (Commit) 975f3cb1 authored tarafından Miss Islington (bot)'s avatar Miss Islington (bot) Kaydeden (comit) GitHub

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


There was a missing PyMem_Free(format) in time_strftime().
(cherry picked from commit 91e6c871)
Co-authored-by: 's avatarZackery Spytz <zspytz@gmail.com>
üst ef4306b2
Fix a memory leak in Modules/timemodule.c. Patch by Zackery Spytz.
......@@ -776,6 +776,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