Skip to content

Commit

Permalink
fix 1050: memory leak in memory_maps() on Windows because we forgot t…
Browse files Browse the repository at this point in the history
…o Py_DECREF
  • Loading branch information
giampaolo committed May 3, 2017
1 parent b1a2bca commit e6f5f49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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*

Expand Down
1 change: 1 addition & 0 deletions psutil/_psutil_windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e6f5f49

Please sign in to comment.