提交 060fd198 编写于 作者: S Shaohua Li 提交者: 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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NShaohua Li <shli@fb.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册