Re: patch: stream leak fix
- From: Alexander Larsson <alexl redhat com>
- To: Frederic Crozat <fcrozat mandrakesoft com>
- Cc: gnome-vfs-list gnome org
- Subject: Re: patch: stream leak fix
- Date: Fri, 6 Dec 2002 02:11:54 -0500 (EST)
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().
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alla lysator liu se
He's a time-tossed voodoo cyborg who dotes on his loving old ma. She's a
sarcastic psychic pearl diver with the power to see death. They fight crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]