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 607602 - newSVGParamSpec() memory leak on NULL
newSVGParamSpec() memory leak on NULL
Status: RESOLVED FIXED
Product: gnome-perl
Classification: Bindings
Component: Glib
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk2-perl-bugs
gtk2-perl-bugs
Depends on:
Blocks:
 
 
Reported: 2010-01-20 21:49 UTC by Kevin Ryde
Modified: 2010-01-21 20:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
program which grows unboundedly (438 bytes, text/x-perl)
2010-01-20 21:49 UTC, Kevin Ryde
  Details
fix for leak (783 bytes, patch)
2010-01-20 21:50 UTC, Kevin Ryde
committed Details | Review

Description Kevin Ryde 2010-01-20 21:49:14 UTC
Created attachment 151872 [details]
program which grows unboundedly

I think the newHV() in newSVGParamSpec() leaks memory if pspec==NULL.  The program foo.pl attached uses ever more more memory.  I expect the HV creation might be done after the NULL check.  The attached diff improves it for me.
Comment 1 Kevin Ryde 2010-01-20 21:50:26 UTC
Created attachment 151874 [details] [review]
fix for leak
Comment 2 Torsten Schoenfeld 2010-01-21 20:31:03 UTC
Looks good to me, thanks.  Committed.