]> git.droids-corp.org - dpdk.git/commitdiff
raw/ioat: fix directory handle leak
authorBruce Richardson <bruce.richardson@intel.com>
Thu, 6 May 2021 11:19:27 +0000 (12:19 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 10 May 2021 09:43:09 +0000 (11:43 +0200)
When reading the /dev directory as part of the bus scan for DSA devices,
the directory handle from opendir was not freed on function return,
leading to a resource leak.

Coverity issue: 370588
Fixes: b7aaf417f936 ("raw/ioat: add bus driver for device scanning automatically")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
drivers/raw/ioat/idxd_bus.c

index 5b448d49de0f8fce675bfa4c990c987c3cbaa151..5199786785ff5ce609a0038243fa3a5d6c6801a3 100644 (file)
@@ -312,6 +312,7 @@ dsa_scan(void)
                dev->device.numa_node = numa_node;
        }
 
+       closedir(dev_dir);
        return 0;
 }