projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b627200
)
nvmet-tcp: fix possible memory leak
author
Sagi Grimberg
<sagi@grimberg.me>
Sat, 3 Aug 2019 03:29:11 +0000
(20:29 -0700)
committer
Sagi Grimberg
<sagi@grimberg.me>
Thu, 29 Aug 2019 19:55:01 +0000
(12:55 -0700)
when we uninit a command in error flow we also need to
free an iovec if it was allocated.
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
drivers/nvme/target/tcp.c
patch
|
blob
|
history
diff --git
a/drivers/nvme/target/tcp.c
b/drivers/nvme/target/tcp.c
index 0d63f3da01178e0a478ead4656ae0ddf0f014055..76e43750b9e500a32cac74a2586f13cc714e78ca 100644
(file)
--- a/
drivers/nvme/target/tcp.c
+++ b/
drivers/nvme/target/tcp.c
@@
-1309,6
+1309,7
@@
static void nvmet_tcp_finish_cmd(struct nvmet_tcp_cmd *cmd)
{
nvmet_req_uninit(&cmd->req);
nvmet_tcp_unmap_pdu_iovec(cmd);
+ kfree(cmd->iov);
if (cmd->req.sg_cnt)
sgl_free(cmd->req.sg);
}