diff --git a/HISTORY.rst b/HISTORY.rst index 67213b2ca..c193dfc8c 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -37,6 +37,7 @@ None - 1046_: [Windows] disk_partitions() on Windows overrides user's SetErrorMode. - 1047_: [Windows] Process username(): memory leak in case exception is thrown. +- 1050_: [Windows] Process.memory_maps memory() leaks memory. *2017-04-10* diff --git a/psutil/_psutil_windows.c b/psutil/_psutil_windows.c index 69d1fdfda..20d20b824 100644 --- a/psutil/_psutil_windows.c +++ b/psutil/_psutil_windows.c @@ -2920,6 +2920,7 @@ psutil_proc_memory_maps(PyObject *self, PyObject *args) { if (PyList_Append(py_retlist, py_tuple)) goto error; Py_DECREF(py_tuple); + Py_DECREF(py_str); } previousAllocationBase = basicInfo.AllocationBase; baseAddress = (PCHAR)baseAddress + basicInfo.RegionSize;