kernel-fxtec-pro1x/drivers/net/ethernet/freescale
Sumera Priyadarsini 50b83d19ab net: gianfar: Add of_node_put() before goto statement
[ Upstream commit 989e4da042ca4a56bbaca9223d1a93639ad11e17 ]

Every iteration of for_each_available_child_of_node() decrements
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 gianfar.c by inserting of_node_put()
before the goto statement.

Issue found with Coccinelle.

Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-09-03 11:24:26 +02:00
..
dpaa Revert "dpaa_eth: fix usage as DSA master, try 3" 2020-06-25 15:33:10 +02:00
fman fsl/fman: fix eth hash table allocation 2020-08-19 08:15:02 +02:00
fs_enet
fec.h net: fec: set GPR bit on suspend by DT configuration. 2020-05-02 17:25:55 +02:00
fec_main.c net: fec: correct the error path for regulator disable in probe 2020-08-26 10:31:03 +02:00
fec_mpc52xx.c
fec_mpc52xx.h
fec_mpc52xx_phy.c
fec_ptp.c
fsl_pq_mdio.c
gianfar.c net: gianfar: Add of_node_put() before goto statement 2020-09-03 11:24:26 +02:00
gianfar.h
gianfar_ethtool.c
Kconfig net: freescale: select CONFIG_FIXED_PHY where needed 2020-06-03 08:19:30 +02:00
Makefile
ucc_geth.c net/ethernet/freescale: rework quiesce/activate for ucc_geth 2020-06-07 13:17:56 +02:00
ucc_geth.h
ucc_geth_ethtool.c
xgmac_mdio.c net/fsl: treat fsl,erratum-a011043 2020-02-05 14:43:52 +00:00