Commit 060fd198 authored by Shaohua Li's avatar Shaohua Li Committed by Jens Axboe

block/nullb: delete unnecessary memory free

Commit 2984c868(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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarShaohua Li <shli@fb.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent e9a823fb
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment