Bug 794995
| Summary: | Memory leak in py_object_call found in lunatic-python-1.0.1-0.6.20090917bzr.fc17 using gcc-with-cpychecker static analyzer | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Dave Malcolm <dmalcolm> |
| Component: | lunatic-python | Assignee: | Gwyn Ciesla <gwync> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | gwync |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://fedorapeople.org/~dmalcolm/gcc-python-plugin/2012-02-18/lunatic-python-1.0.1-0.6.20090917bzr.fc17/ | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-02-20 16:42:00 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 789472 | ||
|
Description
Dave Malcolm
2012-02-18 15:30:03 UTC
It looks like inserting the following at line 138 would do the trick:
for (i = 0; i != nargs; i++) {
Py_DECREF(args);
}
Would it not?
No, it just needs it once, I think, rather than nargs times: "args" is the whole tuple, which the code owns one reference to.
I think this code just needs a single extra Py_DECREF(args) at around line 137, like this:
value = PyObject_CallObject(obj->o, args);
+ Py_DECREF(args);
if (value) {
Got it, thanks! Fixed in rawhide. Thanks! Can you make sure upstream get this report also? Will do. |