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 702034 - color_value_parse() memory leak
color_value_parse() memory leak
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 627707
 
 
Reported: 2013-06-11 16:24 UTC by David Woodhouse
Modified: 2013-09-17 03:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
leak.c (859 bytes, text/plain)
2013-08-09 13:44 UTC, Milan Crha
Details

Description David Woodhouse 2013-06-11 16:24:43 UTC
==18892== 294,080 (42,080 direct, 252,000 indirect) bytes in 2,630 blocks are definitely lost in loss record 44,416 of
 44,487
==18892==    at 0x4A06409: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==18892==    by 0x376804D93E: g_malloc (gmem.c:159)
==18892==    by 0x37680634ED: g_slice_alloc (gslice.c:1003)
==18892==    by 0x3768063A2D: g_slice_alloc0 (gslice.c:1029)
==18892==    by 0x3D0248A727: _gtk_css_symbolic_value_new (gtksymboliccolor.c:68)
==18892==    by 0x3D0251502D: color_value_parse (gtkcssstylefuncs.c:264)
==18892==    by 0x3D02509E2C: gtk_css_provider_get_style_property (gtkcssprovider.c:1530)
==18892==    by 0x3D026098A3: gtk_style_cascade_get_style_property (gtkstylecascade.c:109)
==18892==    by 0x3D0260D38A: _gtk_style_context_peek_style_property (gtkstylecontext.c:2294)
==18892==    by 0x3D026B942D: gtk_widget_style_get_valist (gtkwidget.c:11830)
==18892==    by 0x3D026B9706: gtk_widget_style_get (gtkwidget.c:11868)
==18892==    by 0x3D0704A3E1: get_prop_color (htmlcolorset.c:168)
Comment 1 Milan Crha 2013-08-09 13:44:50 UTC
Created attachment 251237 [details]
leak.c

I cannot reproduce the leak with my simplified version of the related code, valgrind reports only possibly lost memory, which seem to me more to a Gtk's CSS related, than to GtkHTML.

I also see reports around gtk_css_symbolic_value_new() inside gtk_init(), rather than elsewhere.