Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c42d7a30 authored by Chaitanya Kulkarni's avatar Chaitanya Kulkarni Committed by Christoph Hellwig
Browse files

nvmet: free smart-log buffer after use



Free smart-log buffer allocated in the function after use.

Signed-off-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 94423a8f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);
}