Commit eb4375e1969c48d454998b2a284c2e6a5dc9eb68

Authored by Christoph Hellwig
Committed by Greg Kroah-Hartman
1 parent c820441a7a

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>

Showing 1 changed file with 0 additions and 1 deletions Side-by-side Diff

... ... @@ -147,7 +147,6 @@
147 147 failjob_rls_rqst_payload:
148 148 kfree(job->request_payload.sg_list);
149 149 failjob_rls_job:
150   - kfree(job);
151 150 return -ENOMEM;
152 151 }
153 152