mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 05:11:48 +00:00
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: Christoph Hellwig <hch@lst.de> Cc: stable@vger.kernel.org Reviewed-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
02a4843618
commit
f507b54dcc
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user