Re: patch: stream leak fix
- From: Frederic Crozat <fcrozat mandrakesoft com>
- To: Alexander Larsson <alexl redhat com>
- Cc: gnome-vfs-list gnome org
- Subject: Re: patch: stream leak fix
- Date: 06 Dec 2002 10:06:39 +0100
Le ven 06/12/2002 à 08:11, Alexander Larsson a écrit :
> On 5 Dec 2002, Frederic Crozat wrote:
>
> > Le jeu 05/12/2002 à 10:49, Alexander Larsson a écrit :
> > > On 4 Dec 2002, Frederic Crozat wrote:
> > >
> > > > Hi,
> > > >
> > > > while trying to fix a monitoring problem for gnome-vfs mime user dir, I
> > > > found what I think is a stream leak in both write_back_keys_user_file
> > > > and write_back_mime_user_file..
> > > >
> > > > Can I commit the attached patch (with changelog entry, of course..) ?
> > >
> > > I think a better solution is to make ensure_user_directory_exist() return
> > > a gboolean and closedir() itself, since no users actually use the DIR *.
> >
> > Agreed.. But my first though was to not modify internal calls :))
> >
> > Better patch attached..
>
> Actually:
>
> + retval = (dir != NULL);
> + closedir (dir);
> + return retval;
>
> This needs to check if dir != NULL before calling closedir().
Oops, you're right of course..
Fix committed..
--
Frederic Crozat <fcrozat mandrakesoft com>
MandrakeSoft
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]