From: Dan Carpenter Date: Thu, 22 Apr 2010 12:27:23 +0000 (+0200) Subject: drbd: fix memory leak X-Git-Tag: v2.6.34-rc6~15^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7ac314c82f552eefebaa91c9fffe8c0d435641b9;p=profile%2Fcommon%2Fkernel-common.git drbd: fix memory leak We leak memory if "--dry-run" is not supported by the peer. Signed-off-by: Dan Carpenter Signed-off-by: Jens Axboe --- diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 67e0fc5..93d1f9b 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c @@ -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; } }