git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a805de
)
crypto/ccp: fix fd leak on probe failure
author
Yunjian Wang
<wangyunjian@huawei.com>
Sun, 26 Apr 2020 06:36:15 +0000
(14:36 +0800)
committer
Akhil Goyal
<akhil.goyal@nxp.com>
Mon, 11 May 2020 11:17:43 +0000
(13:17 +0200)
Zero is a valid fd. When ccp_probe_device() is failed, the uio_fd won't be
closed thus leading fd leak.
Fixes:
ef4b04f87fa6
("crypto/ccp: support device init")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Ravi Kumar <ravi1.kumar@amd.com>
drivers/crypto/ccp/ccp_dev.c
patch
|
blob
|
history
diff --git
a/drivers/crypto/ccp/ccp_dev.c
b/drivers/crypto/ccp/ccp_dev.c
index
80fe6a4
..
7d98b2e
100644
(file)
--- a/
drivers/crypto/ccp/ccp_dev.c
+++ b/
drivers/crypto/ccp/ccp_dev.c
@@
-760,7
+760,7
@@
ccp_probe_device(const char *dirname, uint16_t domain,
return 0;
fail:
CCP_LOG_ERR("CCP Device probe failed");
- if (uio_fd > 0)
+ if (uio_fd >
=
0)
close(uio_fd);
if (ccp_dev)
rte_free(ccp_dev);