commit | a7bcae591f595a727feea9a5a389756015579072 | [log] [tgz] |
---|---|---|
author | Nishka Dasgupta <nishkadg.linux@gmail.com> | Thu Aug 15 11:52:18 2019 +0530 |
committer | Rob Herring <robh@kernel.org> | Tue Aug 27 11:21:54 2019 -0500 |
tree | 1d7325f4c59ad8108f01386d658ba11cee89d824 | |
parent | 476646e09668cc85138adec726a94f76ca83740d [diff] |
of: unittest: Add of_node_put() before return The local variable np in function of_unittest_platform_populate takes the return value of of_find_node_by_path, which gets a node but does not put it. If np is not put before return it may cause a memory leak. Hence put np before a return statement. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Signed-off-by: Rob Herring <robh@kernel.org>