drbd: fix memory leak
We leak memory if "--dry-run" is not supported by the peer. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
committed by
Jens Axboe
parent
6de9400250
commit
7ac314c82f
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user