mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-03 00:54:09 +08:00
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
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user