提交 c42d7a30 编写于 作者: C Chaitanya Kulkarni 提交者: Christoph Hellwig

nvmet: free smart-log buffer after use

Free smart-log buffer allocated in the function after use.
Signed-off-by: NChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: NChristoph Hellwig <hch@lst.de>
上级 94423a8f
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册