DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] raw/ioat: fix resource leak for directory handle
@ 2021-05-06 11:19 Bruce Richardson
  2021-05-10 10:11 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Bruce Richardson @ 2021-05-06 11:19 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

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 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/raw/ioat/idxd_bus.c b/drivers/raw/ioat/idxd_bus.c
index 5b448d49de..5199786785 100644
--- a/drivers/raw/ioat/idxd_bus.c
+++ b/drivers/raw/ioat/idxd_bus.c
@@ -312,6 +312,7 @@ dsa_scan(void)
 		dev->device.numa_node = numa_node;
 	}
 
+	closedir(dev_dir);
 	return 0;
 }
 
-- 
2.30.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] raw/ioat: fix resource leak for directory handle
  2021-05-06 11:19 [dpdk-dev] [PATCH] raw/ioat: fix resource leak for directory handle Bruce Richardson
@ 2021-05-10 10:11 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2021-05-10 10:11 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

06/05/2021 13:19, Bruce Richardson:
> 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>

Applied, thanks




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-10 10:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-06 11:19 [dpdk-dev] [PATCH] raw/ioat: fix resource leak for directory handle Bruce Richardson
2021-05-10 10:11 ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).