From: Vivek Goyal Date: Tue, 25 Oct 2011 13:48:12 +0000 (+0200) Subject: blk-throttle: Free up policy node associated with deleted rule X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e060f00beee23568fe2c4faf1e88ff22edefd7b2;p=linux-beck.git blk-throttle: Free up policy node associated with deleted rule If a rule is being deleted, free up associated policy node. Otherwise that memory is leaked. Signed-off-by: Vivek Goyal Acked-by: Tejun Heo Signed-off-by: Jens Axboe --- diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index d61ec5636ce0..61553670735d 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -1075,6 +1075,7 @@ static int blkiocg_file_write(struct cgroup *cgrp, struct cftype *cft, if (blkio_delete_rule_command(newpn)) { blkio_policy_delete_node(pn); + kfree(pn); spin_unlock_irq(&blkcg->lock); goto update_io_group; }