summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-09-07 13:54:35 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-05 09:35:52 +0200
commitd9100405a20a71dd620843e0380e38fc50731108 (patch)
tree0637123f8fbae004b84a7d07b9af00f397a158a6 /block
parent65e3664fc6087d2941e940e38beb39920e9ae032 (diff)
downloadlinux-stable-d9100405a20a71dd620843e0380e38fc50731108.tar.gz
linux-stable-d9100405a20a71dd620843e0380e38fc50731108.tar.bz2
linux-stable-d9100405a20a71dd620843e0380e38fc50731108.zip
bsg-lib: don't free job in bsg_prepare_job
commit f507b54dccfd8000c517d740bc45f20c74532d18 upstream. 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> Reviewed-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block')
-rw-r--r--block/bsg-lib.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/block/bsg-lib.c b/block/bsg-lib.c
index 650f427d915b..341b8d858e67 100644
--- a/block/bsg-lib.c
+++ b/block/bsg-lib.c
@@ -147,7 +147,6 @@ static int bsg_create_job(struct device *dev, struct request *req)
failjob_rls_rqst_payload:
kfree(job->request_payload.sg_list);
failjob_rls_job:
- kfree(job);
return -ENOMEM;
}