projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
35a82a3
)
tools: PCI: Fix fd leakage
author
Hewenliang
<hewenliang4@huawei.com>
Sat, 26 Oct 2019 01:35:55 +0000
(21:35 -0400)
committer
Lorenzo Pieralisi
<lorenzo.pieralisi@arm.com>
Tue, 29 Oct 2019 12:04:18 +0000
(12:04 +0000)
We should close fd before the return of run_test.
Fixes:
3f2ed8134834
("tools: PCI: Add a userspace tool to test PCI endpoint")
Signed-off-by: Hewenliang <hewenliang4@huawei.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
tools/pci/pcitest.c
patch
|
blob
|
history
diff --git
a/tools/pci/pcitest.c
b/tools/pci/pcitest.c
index
cb1e51f
..
32b7c6f
100644
(file)
--- a/
tools/pci/pcitest.c
+++ b/
tools/pci/pcitest.c
@@
-129,6
+129,7
@@
static int run_test(struct pci_test *test)
}
fflush(stdout);
+ close(fd);
return (ret < 0) ? ret : 1 - ret; /* return 0 if test succeeded */
}