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 668940 - Memory leak when parsing fails for a child element of a Path
Memory leak when parsing fails for a child element of a Path
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 03:50 UTC by Jason Crain
Modified: 2012-01-29 14:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add error handler to path GMarkupParser (1.15 KB, patch)
2012-01-29 03:50 UTC, Jason Crain
committed Details | Review

Description Jason Crain 2012-01-29 03:50:10 UTC
Created attachment 206346 [details] [review]
add error handler to path GMarkupParser

A GXPSPath struct is leaked when a parsing fails for a child element of a Path.

Example:

<Path>
  <Path.Data>
    <PathGeometry Transform="invalid" />
  </Path.Data>
</Path>

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

Pushed to git master. Thanks!