linux/drivers/net/dsa/ocelot
Sumera Priyadarsini 59ebb4305c net: ocelot: Add of_node_put() before return statement
Every iteration of for_each_available_child_of_node() decrements
the reference count of the previous node, however when control
is transferred from the middle of the loop, as in the case of
a return or break or goto, there is no decrement thus ultimately
resulting in a memory leak.

Fix a potential memory leak in felix.c by inserting of_node_put()
before the return statement.

Issue found with Coccinelle.

Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-08-24 18:04:09 -07:00
..
felix_vsc9959.c net: dsa: felix: (re)use already existing constants 2020-07-19 18:05:49 -07:00
felix.c net: ocelot: Add of_node_put() before return statement 2020-08-24 18:04:09 -07:00
felix.h net: dsa: felix: introduce support for Seville VSC9953 switch 2020-07-13 17:40:02 -07:00
Kconfig net: mscc: ocelot: remove duplicate "the the" phrase in Kconfig text 2020-08-18 16:02:03 -07:00
Makefile net: dsa: felix: introduce support for Seville VSC9953 switch 2020-07-13 17:40:02 -07:00
seville_vsc9953.c net: dsa: felix: introduce support for Seville VSC9953 switch 2020-07-13 17:40:02 -07:00