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 409357 - leak in color scheme code
leak in color scheme code
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.10.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2007-02-18 18:05 UTC by Benjamin Berg
Modified: 2007-02-28 17:06 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Benjamin Berg 2007-02-18 18:05:52 UTC
I am seeing a small leak in the color scheme code while testing engines:

==16996== 76 (32 direct, 44 indirect) bytes in 1 blocks are definitely lost in loss record 2,590 of 3,486
==16996==    at 0xFFBAC70: malloc (vg_replace_malloc.c:149)
==16996==    by 0xF832A7C: g_malloc (gmem.c:131)
==16996==    by 0xF845FC4: g_slice_alloc (gslice.c:777)
==16996==    by 0xF81A22C: g_hash_table_new_full (ghash.c:139)
==16996==    by 0xFDAD390: merge_color_scheme (gtksettings.c:1795)
==16996==    by 0xFDB01E8: gtk_settings_get_property (gtksettings.c:636)
==16996==    by 0xF8F5C30: g_object_get_valist (gobject.c:659)
==16996==    by 0xF8F5FD0: g_object_get (gobject.c:1222)
==16996==    by 0xFDAE554: settings_update_color_scheme (gtksettings.c:1627)
==16996==    by 0xFDB0238: gtk_settings_get_property (gtksettings.c:1811)
==16996==    by 0xF8F5C30: g_object_get_valist (gobject.c:659)
==16996==    by 0xF8F5FD0: g_object_get (gobject.c:1222)
==16996==    by 0xFD89068: gtk_rc_context_get (gtkrc.c:686)
==16996==    by 0xFD8F944: gtk_rc_reparse_all_for_settings (gtkrc.c:1724)
==16996==    by 0xFDAEDAC: gtk_settings_get_for_screen (gtksettings.c:559)
==16996==    by 0xFDAEE8C: gtk_settings_get_default (gtksettings.c:587)
==16996==    by 0x100021B0: main (torturetest.c:428)


To reproduce it should enough to start a program with a theme that uses color schemes and switch to another.
Comment 1 Matthias Clasen 2007-02-28 17:06:29 UTC
2007-02-28  Matthias Clasen <mclasen@redhat.com>

        * gtk/gtkrc.c: Don't leak references to the color-hash
        gotten from GtkSettings.  (#409357, Benjamin Berg)