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:
parent
6de9400250
commit
7ac314c82f
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue