mirror of
https://github.com/torvalds/linux.git
synced 2024-11-01 13:03:25 +01:00
tools: PCI: Fix fd leakage
We should close fd before the return of run_test.
Fixes: 3f2ed81348
("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>
This commit is contained in:
parent
35a82a3795
commit
3c379a59b4
1 changed files with 1 additions and 0 deletions
|
@ -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 */
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue