提交 f507b54d 编写于 作者: C Christoph Hellwig 提交者: Jens Axboe

bsg-lib: don't free job in bsg_prepare_job

The job structure is allocated as part of the request, so we should not
free it in the error path of bsg_prepare_job.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Cc: stable@vger.kernel.org
Reviewed-by: NMing Lei <ming.lei@redhat.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 02a48436
...@@ -154,7 +154,6 @@ static int bsg_prepare_job(struct device *dev, struct request *req) ...@@ -154,7 +154,6 @@ static int bsg_prepare_job(struct device *dev, struct request *req)
failjob_rls_rqst_payload: failjob_rls_rqst_payload:
kfree(job->request_payload.sg_list); kfree(job->request_payload.sg_list);
failjob_rls_job: failjob_rls_job:
kfree(job);
return -ENOMEM; return -ENOMEM;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册