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)
commit2341397eb752209bc22c519d583d9ea8a31e7245
tree953457fb58d5fad11506fd9179bd7ca588ce698a
parent627c5b41bb14a1afbd1489b0fc4b8224532a823d
raw/ioat: fix directory handle leak

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