Revision 64fc973dee130019b86f2c4634a10d7a3158687e authored by Nishka Dasgupta on 16 July 2019, 05:52:19 UTC, committed by David S. Miller on 16 July 2019, 19:38:17 UTC
Each iteration of for_each_available_child_of_node puts the previous
node, but in the case of a return from the middle of the loop, there is
no put, thus causing a memory leak. Hence add an of_node_put before the
return in two places.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 3cd6e20
History
File Mode Size
policy
.gitignore -rw-r--r-- 31 bytes
Kconfig -rw-r--r-- 3.3 KB
Makefile -rw-r--r-- 810 bytes
audit.c -rw-r--r-- 12.4 KB
common.c -rw-r--r-- 76.0 KB
common.h -rw-r--r-- 40.3 KB
condition.c -rw-r--r-- 27.1 KB
domain.c -rw-r--r-- 25.1 KB
environ.c -rw-r--r-- 3.1 KB
file.c -rw-r--r-- 29.1 KB
gc.c -rw-r--r-- 16.6 KB
group.c -rw-r--r-- 5.7 KB
load_policy.c -rw-r--r-- 2.6 KB
memory.c -rw-r--r-- 5.4 KB
mount.c -rw-r--r-- 6.7 KB
network.c -rw-r--r-- 21.4 KB
realpath.c -rw-r--r-- 8.0 KB
securityfs_if.c -rw-r--r-- 7.3 KB
tomoyo.c -rw-r--r-- 15.7 KB
util.c -rw-r--r-- 26.7 KB

back to top