Re: Leak in nautilus-main.c



On Thu, 2005-01-27 at 13:56 +0100, Kjartan Maraas wrote:
> tor, 27,.01.2005 kl. 12.27 +0100, skrev Alexander Larsson:
> > On Wed, 2005-01-26 at 14:58 +0100, Kjartan Maraas wrote:
> > > Could it be that the condition is stopping the icon_info from being
> > > free'd and that the call to gtk_icon_info_free() should be moved out one
> > > level so that it's called always?
> > 
> > Not always, only if info != NULL. but otherwise that sounds right.
> > 
> I'll commit this then:
> 
> diff -u -p -r1.141 nautilus-main.c
> --- nautilus-main.c     18 Jan 2005 08:43:55 -0000      1.141
> +++ nautilus-main.c     27 Jan 2005 12:55:19 -0000
> @@ -172,8 +172,8 @@ register_icons (void)
>                                         gtk_icon_source_set_size_wildcarded (source, FALSE);
>                                 }
>                                 gtk_icon_set_add_source (set, source);
> -                               gtk_icon_info_free (info);
>                         }
> +                       gtk_icon_info_free (info);
>                 }

To play it save, I added the NULL check Alex was suggesting.
Sorry for the confusion.

Martin





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