On Saturday 29 March 2008 05:32, Mike Frysinger wrote:
> On Thursday 27 March 2008, [EMAIL PROTECTED] 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
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox