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 668969 - Memory leak when parsing a ImageBrush element fails
Memory leak when parsing a ImageBrush element 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:37 UTC by Jason Crain
Modified: 2012-01-30 12:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


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

Description Jason Crain 2012-01-29 19:37:04 UTC
Created attachment 206370 [details] [review]
add error handler to brush_image GMarkupParser 

A GXPSBrushImage struct is leaked when parsing fails for a child element of a ImageBrush.

Example:

<Path>  
  <Path.Fill>
    <ImageBrush ImageSource=".">
      <invalid />
    </ImageBrush>
  </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_image GMarkupParser to free the struct on error.
Comment 1 Carlos Garcia Campos 2012-01-30 12:57:42 UTC
Review of attachment 206370 [details] [review]:

Pushed! Thank you