On Monday 27 December 2010 10:02, Lauri Kasanen wrote:
> Hi
> 
> find_block_device_in_dir has a potential DIR leak.

        len = strlen(ap->devpath);
        rem = DEVNAME_MAX-2 - len;
-       if (rem <= 0)
+       if (rem <= 0) {
+               closedir(dir);
                return NULL;
+       }

It can be achieved simply by moving this code block up
before opendir.

Fixed in git.

-- 
vda
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to