GNOME Bugzilla – Bug 683627
Memory leak in style_data_lookup
Last modified: 2012-09-13 21:02:00 UTC
There's a large-ish leak in here, reported lots of times in a short valgrind run: ==11032== 1,424 (48 direct, 1,376 indirect) bytes in 2 blocks are definitely lost in loss record 14,567 of 14,916 ==11032== at 0x4A074CD: malloc (vg_replace_malloc.c:236) ==11032== by 0x7B16E7B: standard_malloc (gmem.c:85) ==11032== by 0x7B16F04: g_malloc (gmem.c:159) ==11032== by 0x7B2F8B4: g_slice_alloc (gslice.c:1003) ==11032== by 0x7B2F8F3: g_slice_alloc0 (gslice.c:1029) ==11032== by 0x71AE1C7: style_data_new (gtkstylecontext.c:478) ==11032== by 0x71AF0D0: style_data_lookup (gtkstylecontext.c:981) ==11032== by 0x71B4119: _gtk_style_context_validate (gtkstylecontext.c:3169) ==11032== by 0x71B42C3: _gtk_style_context_validate (gtkstylecontext.c:3209) ==11032== by 0x71B42C3: _gtk_style_context_validate (gtkstylecontext.c:3209) ==11032== by 0x71B42C3: _gtk_style_context_validate (gtkstylecontext.c:3209) ==11032== by 0x72B91CB: gtk_window_show (gtkwindow.c:4826) ==11032== by 0x442CD2: ephy_window_show (ephy-window.c:3829) ==11032== by 0x7A78407: g_cclosure_marshal_VOID__VOID (gmarshal.c:85) ==11032== by 0x7A75B14: g_type_class_meta_marshal (gclosure.c:970) ==11032== by 0x7A7545F: g_closure_invoke (gclosure.c:777) ==11032== by 0x7A92BD3: signal_emit_unlocked_R (gsignal.c:3481) ==11032== by 0x7A92147: g_signal_emit_valist (gsignal.c:3300) ==11032== by 0x7A92690: g_signal_emit (gsignal.c:3356) ==11032== by 0x7299461: gtk_widget_show (gtkwidget.c:4038)
Can also reproduce with Nautilus, confirming.
Created attachment 224251 [details] [review] stylecontext: fix a StyleData refleak We were failing to unref the style data in some code paths.
Attachment 224251 [details] pushed as f57778e - stylecontext: fix a StyleData refleak Pushed to master.