diff options
author | Christoph Hellwig <[email protected]> | 2017-09-07 13:54:35 +0200 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2017-09-25 08:56:05 -0600 |
commit | f507b54dccfd8000c517d740bc45f20c74532d18 (patch) | |
tree | 8b6d8fdbafe4dee31f597776c36834bd4d5601f1 | |
parent | 02a4843618fb35f847cf8c31cd3893873aa0edde (diff) |
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 <[email protected]>
Cc: [email protected]
Reviewed-by: Ming Lei <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
-rw-r--r-- | block/bsg-lib.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/block/bsg-lib.c b/block/bsg-lib.c index c82408c7cc3c..dbddff8174e5 100644 --- a/block/bsg-lib.c +++ b/block/bsg-lib.c @@ -154,7 +154,6 @@ static int bsg_prepare_job(struct device *dev, struct request *req) failjob_rls_rqst_payload: kfree(job->request_payload.sg_list); failjob_rls_job: - kfree(job); return -ENOMEM; } |