mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 17:24:17 +08:00
nvmet: free smart-log buffer after use
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>
This commit is contained in:
parent
94423a8f89
commit
c42d7a30ab
@ -119,9 +119,11 @@ static void nvmet_execute_get_log_page_smart(struct nvmet_req *req)
|
|||||||
else
|
else
|
||||||
status = nvmet_get_smart_log_nsid(req, log);
|
status = nvmet_get_smart_log_nsid(req, log);
|
||||||
if (status)
|
if (status)
|
||||||
goto out;
|
goto out_free_log;
|
||||||
|
|
||||||
status = nvmet_copy_to_sgl(req, 0, log, sizeof(*log));
|
status = nvmet_copy_to_sgl(req, 0, log, sizeof(*log));
|
||||||
|
out_free_log:
|
||||||
|
kfree(log);
|
||||||
out:
|
out:
|
||||||
nvmet_req_complete(req, status);
|
nvmet_req_complete(req, status);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user