]> git.karo-electronics.de Git - karo-tx-linux.git/commit
taskstats: cgroupstats_user_cmd() may leak on error
authorJesper Juhl <jj@chaosbits.net>
Thu, 13 Sep 2012 01:01:37 +0000 (11:01 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 18 Sep 2012 06:04:51 +0000 (16:04 +1000)
commiteb34a6aa0f6b2e7fbdcc6dcc75ee3b9ba7b255f6
tree9521d053e55edc5e15070de364e3b27515f661d1
parente0cb2b1b56be256480f97b64bccaaf3e76c4018d
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