提交 7ac314c8 编写于 作者: D Dan Carpenter 提交者: Jens Axboe

drbd: fix memory leak

We leak memory if "--dry-run" is not supported by the peer.
Signed-off-by: NDan Carpenter <error27@gmail.com>
Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
上级 6de94002
......@@ -1695,6 +1695,7 @@ int drbd_send_protocol(struct drbd_conf *mdev)
cf |= CF_DRY_RUN;
else {
dev_err(DEV, "--dry-run is not supported by peer");
kfree(p);
return 0;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册