]> git.kernelconcepts.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>
Mon, 17 Sep 2012 10:46:24 +0000 (20:46 +1000)
commit6ddd837becb55de3bd90cfe48a2db8187ee8e8ad
tree67071237c152b722b223d4ed9ef4618e9f8c8586
parentb2c3f061d5bbbd038209e5f2bf8ec780fa91b146
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