projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
94423a8
)
nvmet: free smart-log buffer after use
author
Chaitanya Kulkarni
<chaitanya.kulkarni@wdc.com>
Mon, 11 Jun 2018 07:20:24 +0000
(
03:20
-0400)
committer
Christoph Hellwig
<hch@lst.de>
Mon, 11 Jun 2018 14:18:05 +0000
(16:18 +0200)
Free smart-log buffer allocated in the function after use.
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/admin-cmd.c
patch
|
blob
|
history
diff --git
a/drivers/nvme/target/admin-cmd.c
b/drivers/nvme/target/admin-cmd.c
index
9625328
..
3880357
100644
(file)
--- a/
drivers/nvme/target/admin-cmd.c
+++ b/
drivers/nvme/target/admin-cmd.c
@@
-119,9
+119,11
@@
static void nvmet_execute_get_log_page_smart(struct nvmet_req *req)
else
status = nvmet_get_smart_log_nsid(req, log);
if (status)
- goto out;
+ goto out
_free_log
;
status = nvmet_copy_to_sgl(req, 0, log, sizeof(*log));
+out_free_log:
+ kfree(log);
out:
nvmet_req_complete(req, status);
}