diff options
author | Zackery Spytz <zspytz@gmail.com> | 2018-09-21 06:09:48 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2018-09-21 06:09:48 (GMT) |
commit | 91e6c8717b7dcbcc46b189509de5f2d335819f37 (patch) | |
tree | 8fb5e38471f96e5816d698f83525d2c973095257 /Modules/timemodule.c | |
parent | c510c6b8b60f211793e0b84c317ea6974e8a6153 (diff) | |
download | cpython-91e6c8717b7dcbcc46b189509de5f2d335819f37.zip cpython-91e6c8717b7dcbcc46b189509de5f2d335819f37.tar.gz cpython-91e6c8717b7dcbcc46b189509de5f2d335819f37.tar.bz2 |
bpo-34735: Fix a memory leak in Modules/timemodule.c (GH-9418)
There was a missing PyMem_Free(format) in time_strftime().
Diffstat (limited to 'Modules/timemodule.c')
-rw-r--r-- | Modules/timemodule.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/timemodule.c b/Modules/timemodule.c index d162d93..f41d6fa 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -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; } } |