]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
super-intel.c: Fix resource leak from opendir()
authorJes Sorensen <Jes.Sorensen@redhat.com>
Fri, 4 May 2012 11:41:22 +0000 (13:41 +0200)
committerNeilBrown <neilb@suse.de>
Sun, 6 May 2012 23:09:33 +0000 (09:09 +1000)
Use closedir() on dirp from opendir() to avoid resource leaking.

Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
super-intel.c

index ca15703eb2c0b4aab7fb6d87b51759fcc51cb851..e2ed95a15232ff1fe7e4947703ef6753450dbcce 100644 (file)
@@ -5686,6 +5686,7 @@ get_devices(const char *hba_path)
                        free(dv);
                }
        }
+       closedir(dir);
        return devlist;
 }