[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: svn commit: trunk/busybox: libbb testsuite util-linux
From:       Denys Vlasenko <vda.linux () googlemail ! com>
Date:       2008-03-29 6:12:41
Message-ID: 200803290712.41926.vda.linux () googlemail ! com
[Download RAW message or body]

On Saturday 29 March 2008 05:32, Mike Frysinger wrote:
> On Thursday 27 March 2008, vda@busybox.net wrote:
> > Author: vda
> > Date: 2008-03-27 15:45:44 -0700 (Thu, 27 Mar 2008)
> > New Revision: 21522
> >
> > Log:
> > mdev: plug a few memory and fd leaks; simplify code a bit
> 
> as long as the resulting code is smaller, OK, otherwise this is a bug imo.  
> mdev is not meant to be executed via the shell, only by the kernel via the 
> hotplug mechanism.  that means any memory it may leak is irrelevant as mdev 
> is a very short lived process.

mdev -s executes make_device() function repeatedly for each device.
And make_device() contained this:

                if (ENABLE_FEATURE_CLEAN_UP)
                        fclose(fp);

Although in many cases mdev -s will successfully iterate over all
devices before it runs out of fds, there's no way to be sure about it.
--
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic