svn commit: trunk/busybox: libbb testsuite util-linux

Denys Vlasenko vda.linux at
Sat Mar 29 06:12:41 UTC 2008

On Saturday 29 March 2008 05:32, Mike Frysinger wrote:
> On Thursday 27 March 2008, vda at 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)

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.

More information about the busybox-cvs mailing list