Skip to content

Commit

Permalink
drbd: fix memory leak
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Jens Axboe committed Apr 22, 2010
1 parent 6de9400 commit 7ac314c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/block/drbd/drbd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 7ac314c

Please sign in to comment.