diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2013-03-27 17:08:42 +0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-03-28 20:10:25 +0400 |
commit | 94ad0a101415978be04945b2787be1e8e8a874db (patch) | |
tree | 58e84c9d3a0a53a0cca3c038d1273e6411a423e7 | |
parent | 7074e4a745799d521b17775f6d076d84dc7f8c50 (diff) | |
download | linux-94ad0a101415978be04945b2787be1e8e8a874db.tar.xz |
drbd: fix memory leak
We forgot to free the disk_conf,
so for each attach/detach cycle we leaked 336 bytes.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 67d2bb3bb533..1b93a7262ef7 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c @@ -2819,6 +2819,7 @@ void drbd_free_bc(struct drbd_backing_dev *ldev) blkdev_put(ldev->backing_bdev, FMODE_READ | FMODE_WRITE | FMODE_EXCL); blkdev_put(ldev->md_bdev, FMODE_READ | FMODE_WRITE | FMODE_EXCL); + kfree(ldev->disk_conf); kfree(ldev); } |