GNOME Bugzilla – Bug 699256
AtkSocket not freeing 'embedded_plug_id' when destroyed
Last modified: 2013-04-30 09:42:16 UTC
atk_socket_embed() creates a copy of the plug id string, however that memory is never freed when the object is destroyed, since neither dispose() nor finalize() are overrided in AtkSocket. Example stack trace: ==26520== 35 bytes in 1 blocks are definitely lost in loss record 4,057 of 8,513 ==26520== at 0x4C28BED: malloc (vg_replace_malloc.c:263) ==26520== by 0x9D0D460: g_malloc (gmem.c:159) ==26520== by 0x9D23E6B: g_strdup (gstrfuncs.c:364) ==26520== by 0x8699025: atk_socket_embed (atksocket.c:88) ==26520== by 0x5348BC4: webkitWebViewBaseGetAccessible(_GtkWidget*) (in /opt/jhbuild/gnome3/checkout/WebKit/WebKitBuild/Release/.libs/libwebkit2gtk-3.0.so$ ==26520== by 0x7FFF9D5: gtk_container_accessible_real_remove_gtk (gtkcontaineraccessible.c:141) ==26520== by 0x9A7D2AF: g_closure_invoke (gclosure.c:777) ==26520== by 0x9A8FF5F: signal_emit_unlocked_R (gsignal.c:3584) ==26520== by 0x9A98153: g_signal_emit_valist (gsignal.c:3328) ==26520== by 0x9A983F1: g_signal_emit (gsignal.c:3384) ==26520== by 0x7FB9E8C: gtk_widget_dispose (gtkwidget.c:11005) ==26520== by 0x9A841DF: g_object_run_dispose (gobject.c:1062) ==26520== by 0x7E96EEB: gtk_overlay_forall (gtkoverlay.c:591) ==26520== by 0x7DB4A36: gtk_container_destroy (gtkcontainer.c:1384) ==26520== by 0x9A7D1ED: g_closure_invoke (gclosure.c:777) ==26520== by 0x9A90204: signal_emit_unlocked_R (gsignal.c:3700) ==26520== by 0x9A98153: g_signal_emit_valist (gsignal.c:3328) ==26520== by 0x9A983F1: g_signal_emit (gsignal.c:3384) ==26520== by 0x7FB9F27: gtk_widget_dispose (gtkwidget.c:11016) ==26520== by 0x9A841DF: g_object_run_dispose (gobject.c:1062)
Created attachment 242839 [details] [review] Overrides finalize() in AtkSocket to free 'embedded_plug_id'
Review of attachment 242839 [details] [review]: Looks good
(In reply to comment #2) > Review of attachment 242839 [details] [review]: > > Looks good Committed and pushed in behalf of Eduardo Lima. Also pushed for gnome-3-8 branch. Closing bug.