Commit 7ac314c8 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jens Axboe

drbd: fix memory leak

We leak memory if "--dry-run" is not supported by the peer.
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent 6de94002
...@@ -1695,6 +1695,7 @@ int drbd_send_protocol(struct drbd_conf *mdev) ...@@ -1695,6 +1695,7 @@ int drbd_send_protocol(struct drbd_conf *mdev)
cf |= CF_DRY_RUN; cf |= CF_DRY_RUN;
else { else {
dev_err(DEV, "--dry-run is not supported by peer"); dev_err(DEV, "--dry-run is not supported by peer");
kfree(p);
return 0; return 0;
} }
} }
......
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