1
0
Fork 0
alistair23-linux/drivers/net/ethernet/freescale
Sumera Priyadarsini 9c0305c0cf net: gianfar: Add of_node_put() before goto statement
[ Upstream commit 989e4da042 ]

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:27:00 +02:00
..
dpaa Revert "dpaa_eth: fix usage as DSA master, try 3" 2020-07-31 18:39:32 +02:00
dpaa2 dpaa2-eth: Fix passing zero to 'PTR_ERR' warning 2020-08-11 15:33:40 +02:00
enetc enetc: Remove the mdio bus on PF probe bailout 2020-07-29 10:18:34 +02:00
fman fsl/fman: fix eth hash table allocation 2020-08-19 08:16:21 +02:00
fs_enet net: Use skb_frag_off accessors 2019-07-30 14:21:32 -07:00
Kconfig net: freescale: select CONFIG_FIXED_PHY where needed 2020-06-03 08:21:12 +02:00
Makefile enetc: Introduce basic PF and VF ENETC ethernet drivers 2019-01-24 21:55:53 -08:00
fec.h net: fec: set GPR bit on suspend by DT configuration. 2020-05-02 08:48:55 +02:00
fec_main.c net: fec: correct the error path for regulator disable in probe 2020-08-26 10:41:01 +02:00
fec_mpc52xx.c net: ethernet: fix similar warning reported by kbuild test robot 2019-05-10 15:14:29 -07:00
fec_mpc52xx.h
fec_mpc52xx_phy.c
fec_ptp.c net: fec_ptp: Use platform_get_irq_xxx_optional() to avoid error message 2019-10-29 17:57:16 -07:00
fsl_pq_mdio.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
gianfar.c net: gianfar: Add of_node_put() before goto statement 2020-09-03 11:27:00 +02:00
gianfar.h gianfar: cleanup gianfar.h 2019-09-05 12:28:15 +02:00
gianfar_ethtool.c gianfar: remove forward declarations 2019-09-05 12:28:14 +02:00
ucc_geth.c net/ethernet/freescale: rework quiesce/activate for ucc_geth 2020-06-07 13:18:51 +02:00
ucc_geth.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ucc_geth_ethtool.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
xgmac_mdio.c net/fsl: treat fsl,erratum-a011043 2020-02-05 21:22:51 +00:00