After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 691509 - In arrays may not be cleaned up
In arrays may not be cleaned up
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: general
Git master
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2013-01-10 22:38 UTC by Mike Gorse
Modified: 2013-01-11 15:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch. (936 bytes, patch)
2013-01-10 22:44 UTC, Mike Gorse
committed Details | Review

Description Mike Gorse 2013-01-10 22:38:44 UTC
Sometimes a cleanup function is not set for an array used to pass variable arguments, so the memory is leaked.
Comment 1 Mike Gorse 2013-01-10 22:44:00 UTC
Created attachment 233193 [details] [review]
Proposed patch.

I'm not entirely sure if this patch is correct (I can't tell whether you're intentionally returning there without setting a handler), but make check still passes, and make check.valgrind reports less leaked memory (ie, with the GtkTreeStore tests) and doesn't show any new instances of memory being accessed after being freed.
Comment 2 Martin Pitt 2013-01-11 15:45:47 UTC
Comment on attachment 233193 [details] [review]
Proposed patch.

Well spotted, thanks! This looks correct to me; the cleanup is set further down, but it presumably was just forgotten in that exit path.