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 668968 - Memory leak when parsing a brush fails
Memory leak when parsing a brush fails
Status: RESOLVED FIXED
Product: libgxps
Classification: Platform
Component: general
0.2.x
Other Linux
: Normal minor
: ---
Assigned To: libgxps maintainers
libgxps maintainers
Depends on:
Blocks:
 
 
Reported: 2012-01-29 19:19 UTC by Jason Crain
Modified: 2012-01-30 12:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add error handler to brush GMarkupParser (1.17 KB, patch)
2012-01-29 19:19 UTC, Jason Crain
committed Details | Review

Description Jason Crain 2012-01-29 19:19:55 UTC
Created attachment 206369 [details] [review]
add error handler to brush GMarkupParser 

A GXPSBrush struct is leaked when parsing fails for a child of a XXX.Fill or XXX.Stroke element.

Example:

<Path>  
  <Path.Fill>
    <invalid />
  </Path.Fill>
</Path>

Parsing is aborted when invalid data is encountered and cleanup code is not run.  This adds a error handler to the brush GMarkupParser to free the struct on error.
Comment 1 Carlos Garcia Campos 2012-01-30 12:58:34 UTC
Review of attachment 206369 [details] [review]:

Pushed! Thank you