Re: [Fwd: Gio filechooser backend crash]



Le vendredi 07 mars 2008, à 09:51 +0100, Olav Vitters a écrit :
> On Thu, Mar 06, 2008 at 11:33:56PM +0100, Kjartan Maraas wrote:
> > This is a freeze break request to fix a crash in the file chooser
> > backend.
> 
> Not sure how to approve if I don't understand the patch -- could someone
> else review?
> 
> Content-Description: Videresendt melding - Gio filechooser backend crash
> > Index: gtkfilesystemgio.c
> > ===================================================================
> > --- gtkfilesystemgio.c	(revision 5555)
> > +++ gtkfilesystemgio.c	(working copy)
> > @@ -787,7 +787,6 @@ get_icon_string (GIcon *icon)
> >  
> >        icon_file = g_file_icon_get_file (G_FILE_ICON (icon));
> >        name = g_file_get_path (icon_file);
> > -      g_object_unref (icon_file);
> >      }
> >  
> >    return name;
> 
> Wouldn't that leak icon_file?

GFile *
g_file_icon_get_file (GFileIcon *icon)
{
  g_return_val_if_fail (G_IS_FILE_ICON (icon), NULL);

  return icon->file;
}

The GFile is owned by the GIconFile.

Approval 2 from me.

Vincent

-- 
Les gens heureux ne sont pas pressés.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]