Re: [PATCH] sched: fix struct autogroup memory leak

From: Peter Zijlstra
Date: Wed Jan 05 2011 - 05:20:50 EST


On Wed, 2011-01-05 at 11:11 +0100, Mike Galbraith wrote:

> static inline void autogroup_free(struct task_group *tg)
> {
> - kfree(tg->autogroup);
> + if (tg->autogroup)
> + kfree(tg->autogroup);
> }

WARNING: kfree(NULL) is safe this check is probably not required
#43: FILE: kernel/sched_autogroup.c:24:
+ if (tg->autogroup)
+ kfree(tg->autogroup);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/