Skip to content

Commit

Permalink
block/nullb: delete unnecessary memory free
Browse files Browse the repository at this point in the history
Commit 2984c86(nullb: factor disk parameters) has a typo. The
nullb_device allocation/free is done outside of null_add_dev. The commit
accidentally frees the nullb_device in error code path.

Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Shaohua Li <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
shligit authored and axboe committed Aug 28, 2017
1 parent e9a823f commit 060fd19
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/block/null_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1909,7 +1909,6 @@ static int null_add_dev(struct nullb_device *dev)
out_free_nullb:
kfree(nullb);
out:
null_free_dev(dev);
return rv;
}

Expand Down

0 comments on commit 060fd19

Please sign in to comment.