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 147303 - gtk_file_system_gnome_vfs_render_icon leaks a GnomeVFSFileInfo
gtk_file_system_gnome_vfs_render_icon leaks a GnomeVFSFileInfo
Status: RESOLVED FIXED
Product: libgnomeui
Classification: Deprecated
Component: file-chooser
2.4.x
Other Linux
: High normal
: future
Assigned To: Alexander Larsson
Alexander Larsson
: 151062 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-07-10 22:42 UTC by Christian Persch
Modified: 2005-01-25 22:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed fix (536 bytes, patch)
2004-07-10 22:42 UTC, Christian Persch
accepted-commit_now Details | Review

Description Christian Persch 2004-07-10 22:42:19 UTC
==2960== 112 bytes in 1 blocks are definitely lost in loss record 12891 of 14627
==2960==    at 0x400244B1: calloc (vg_replace_malloc.c:201)
==2960==    by 0x40B9C80E: g_malloc0 (gmem.c:153)
==2960==    by 0x40A4F74F: gnome_vfs_file_info_new (gnome-vfs-file-info.c:51)
==2960==    by 0x4C1911DB: get_vfs_info (gtkfilesystemgnomevfs.c:1325)
==2960==    by 0x4C1912B7: gtk_file_system_gnome_vfs_render_icon
(gtkfilesystemgnomevfs.c:1356)
==2960==    by 0x4061A28B: gtk_file_system_render_icon (gtkfilesystem.c:696)
==2960==    by 0x40608056: shortcuts_insert_path (gtkfilechooserdefault.c:1016)
==2960==    by 0x40608213: shortcuts_append_desktop (gtkfilechooserdefault.c:1071)
==2960==    by 0x40608D13: shortcuts_model_create (gtkfilechooserdefault.c:1448)
==2960==    by 0x4060B9A9: gtk_file_chooser_default_constructor
(gtkfilechooserdefault.c:3059)
==2960==    by 0x40B395DD: g_object_newv (gobject.c:941)
==2960==    by 0x40B39C8F: g_object_new_valist (gobject.c:1025)
==2960==    by 0x40B392A5: g_object_new (gobject.c:822)
==2960==    by 0x4060F4B7: _gtk_file_chooser_default_new
(gtkfilechooserdefault.c:5094)
==2960==    by 0x40610AAB: gtk_file_chooser_widget_constructor
(gtkfilechooserwidget.c:155)
==2960==    by 0x40B395DD: g_object_newv (gobject.c:941)
==2960==    by 0x40B39E1D: g_object_new_valist (gobject.c:984)
==2960==    by 0x40B392A5: g_object_new (gobject.c:822)
==2960==    by 0x40604F9A: gtk_file_chooser_dialog_constructor
(gtkfilechooserdialog.c:385)
==2960==    by 0x80E40E6: ephy_file_chooser_constructor (ephy-file-chooser.c:114)
==2960==    by 0x40B395DD: g_object_newv (gobject.c:941)
==2960==    by 0x40B39C8F: g_object_new_valist (gobject.c:1025)
==2960==    by 0x40B392A5: g_object_new (gobject.c:822)
==2960==    by 0x80E46C8: ephy_file_chooser_new (ephy-file-chooser.c:307)


gtk_file_system_gnome_vfs_render_icon does
  info = get_vfs_info (file_system, path, GTK_FILE_INFO_MIME_TYPE);
which returns a ref (either a new or a gnome_vfs_file_info_ref()'d
GnomeVFSFileInfo); but the GnomeVFSFileInfo is never gnome_vfs_file_info_unref()'d.
Comment 1 Christian Persch 2004-07-10 22:42:45 UTC
Created attachment 29414 [details] [review]
proposed fix
Comment 2 Danielle Madeley 2004-07-11 06:28:09 UTC
Adding the PATCH keyword.
Comment 3 Thierry Moisan 2004-08-26 17:14:22 UTC
*** Bug 151062 has been marked as a duplicate of this bug. ***
Comment 4 Federico Mena Quintero 2005-01-25 22:14:46 UTC
Comment on attachment 29414 [details] [review]
proposed fix

Thanks!  Will commit this in a second.
Comment 5 Federico Mena Quintero 2005-01-25 22:21:38 UTC
Committed to gnome-2-8 and HEAD.  Thanks for the patch, Christian :)