bug-hurd
[Top][All Lists]
Advanced

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

Re: memory leak in dir-lookup found


From: Marcus Brinkmann
Subject: Re: memory leak in dir-lookup found
Date: Wed, 28 Mar 2001 20:04:36 +0200
User-agent: Mutt/1.3.15i

On Wed, Mar 28, 2001 at 06:40:40PM +0200, Marcus Brinkmann wrote:
> Note that we know that this is not a port leak, so the dirport doesn't get
> lost. The actual problem happens in conjunction with diskfs_create_protid, 
> which
> calls diskfs_finish_protid, which does not consume the iouser, but
> duplicates it

I checked libnetfs and libtrivfs, but either consume iousers that are passed
around (at least netfs_make_protid does, and libtrivfs is much simpler).

For consistency, it might be worth to consider making libdiskfs and libnetfs
behaving identical. There are some iohelp_dup_iouser calls in libnetfs, so it
could be argued that either behaviour is appropriate, and we might as well
move the iohelp_dup_iouser into netfs_make_protid. Or one might argue that
we don't want to create an iouser just to destroy it after it was
duplicated. In this case it might be worth it to move the dup outside
diskfs_make_protid (it's needed by more callers there than it is
superflouous, though). What do you think?

I am checking in the following fix. I tested it and nothing broke loose.

2001-03-28  Marcus Brinkmann  <marcus@gnu.org>

        * dir-lookup.c (diskfs_S_dir_lookup): New variable USER. Store new
        iouser in that variable and free it after creating the protid for
        DIRPORT.
        * trans-callback.c (_diskfs_translator_callback2_fn): Likewise.
        * io-restrict-auth.c (diskfs_S_io_restrict_auth): Likewise.
        * io-reauthenticate.c (diskfs_S_io_reauthenticate): Likewise.

Thanks,
Marcus

-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann              GNU    http://www.gnu.org    marcus@gnu.org
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de



reply via email to

[Prev in Thread] Current Thread [Next in Thread]