diff options
author | Dan Carpenter <error27@gmail.com> | 2010-09-13 14:09:33 +0200 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-09-21 11:49:17 +0200 |
commit | b0722cb1ac84863f57471d2b254457c100319300 (patch) | |
tree | 94baf120e813a169aa1d919dcb160f0d05276241 /block/blk-map.c | |
parent | 2422084a94fcd5038406261b331672a13c92c050 (diff) | |
download | linux-3.10-b0722cb1ac84863f57471d2b254457c100319300.tar.gz linux-3.10-b0722cb1ac84863f57471d2b254457c100319300.tar.bz2 linux-3.10-b0722cb1ac84863f57471d2b254457c100319300.zip |
cciss: freeing uninitialized data on error path
The "h->scatter_list" is allocated inside a for loop. If any of those
allocations fail, then the rest of the list is uninitialized data. When
we free it we should start from the top and free backwards so that we
don't call kfree() on uninitialized pointers.
Also if the allocation for "h->scatter_list" fails then we would get an
Oops here. I should have noticed this when I send: 4ee69851c "cciss:
handle allocation failure." but I didn't. Sorry about that.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'block/blk-map.c')
0 files changed, 0 insertions, 0 deletions