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 699256 - AtkSocket not freeing 'embedded_plug_id' when destroyed
AtkSocket not freeing 'embedded_plug_id' when destroyed
Status: RESOLVED FIXED
Product: atk
Classification: Platform
Component: atk
unspecified
Other Linux
: Normal normal
: ---
Assigned To: ATK maintainer(s)
ATK maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-04-29 20:00 UTC by Eduardo Lima Mitev
Modified: 2013-04-30 09:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Overrides finalize() in AtkSocket to free 'embedded_plug_id' (1.23 KB, patch)
2013-04-29 20:08 UTC, Eduardo Lima Mitev
accepted-commit_now Details | Review

Description Eduardo Lima Mitev 2013-04-29 20:00:53 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)
Comment 1 Eduardo Lima Mitev 2013-04-29 20:08:18 UTC
Created attachment 242839 [details] [review]
Overrides finalize() in AtkSocket to free 'embedded_plug_id'
Comment 2 Alejandro Piñeiro Iglesias (IRC: infapi00) 2013-04-30 09:27:42 UTC
Review of attachment 242839 [details] [review]:

Looks good
Comment 3 Alejandro Piñeiro Iglesias (IRC: infapi00) 2013-04-30 09:42:16 UTC
(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.