memory leak in client_list
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
subvertpy |
Fix Released
|
Medium
|
Wez Furlong |
Bug Description
I'm writing an svn->hg migration tool which makes relatively heavy use of this function over many revisions and noticed that memory usage was increasing. With the help of the "Instruments" tool on OS/X, I determined that there were two leaks in the success path; one of the temporary apr pool and the other of a reference to the dict created by the list_receiver.
The following patch appears to address the issue, with the caveat that I am not especially familiar with the python guts!
=== modified file 'subvertpy/
--- subvertpy/client.c 2011-09-18 17:14:02 +0000
+++ subvertpy/client.c 2011-09-18 17:14:06 +0000
@@ -165,6 +165,7 @@
}
PyDict_
+ Py_DECREF(value);
PyGILState
@@ -1105,6 +1106,7 @@
#endif
+ apr_pool_
return entry_dict;
}
Changed in subvertpy: | |
status: | Fix Committed → Fix Released |
Thanks for the patch! Your solution is fine, so I've pushed it to trunk.