]> git.karo-electronics.de Git - karo-tx-linux.git/commit
taskstats: cgroupstats_user_cmd() may leak on error
authorJesper Juhl <jj@chaosbits.net>
Fri, 7 Sep 2012 00:25:14 +0000 (10:25 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 7 Sep 2012 05:36:39 +0000 (15:36 +1000)
commit631d62303803b7655c53fa32e9e8328ee6f2a8a0
treedb7c214295da72e957954ef169d50696222bf6a9
parent5912aa1184a299af7ec096e646cb9493231e86a5
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