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:
Родитель
6de9400250
Коммит
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;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче