]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
taskstats: cgroupstats_user_cmd() may leak on error
authorJesper Juhl <jj@chaosbits.net>
Fri, 28 Sep 2012 00:22:26 +0000 (10:22 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 3 Oct 2012 06:51:05 +0000 (16:51 +1000)
commit35eafe3fe5a4ef43c4a19f4db8a8bb810f93a615
tree4bed047f8b994ca3fe5b7e07a81d856e849ce6e5
parent43872bff375bf6e34b7d914c060c3d1f6d99dc79
taskstats: cgroupstats_user_cmd() may leak on error

If prepare_reply() succeeds we have allocated memory for 'rep_skb'.  If
nla_reserve() then subsequently fails and returns NULL we fail to release
the memory we allocated, thus causing a leak.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Cc: Balbir Singh <bsingharora@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/taskstats.c