# HG changeset patch # User Yuya Nishihara # Date 1439523401 -32400 # Node ID 9e7d805925c87cfa0ca30819e8273ac37fd77a62 # Parent a3d5da8b641ee0a6336d708d839d3dad809fc86f reachableroots: fix memleak of integer objects at includepath loop In the first visit loop, val is decref-ed correctly after PySet_Add(). Let's do the same for the includepath loop. diff -r a3d5da8b641e -r 9e7d805925c8 mercurial/parsers.c --- a/mercurial/parsers.c Fri Aug 14 12:31:56 2015 +0900 +++ b/mercurial/parsers.c Fri Aug 14 12:36:41 2015 +0900 @@ -1232,6 +1232,7 @@ if (val == NULL) goto bail; PySet_Add(reachable, val); + Py_DECREF(val); } Py_DECREF(p); }