]> git.baikalelectronics.ru Git - kernel.git/commit
eth: sp7021: fix use after free bug in spl2sw_nvmem_get_mac_address
authorZheng Wang <zyytlz.wz@163.com>
Fri, 30 Sep 2022 17:57:25 +0000 (01:57 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Oct 2022 11:47:42 +0000 (12:47 +0100)
commitd1f9622c86d4c2f4060a61c5d87f2e5ed40738a8
treebb9bc5292f1be8f5ea9513c2ba198c481e905968
parent74566b14b9aa9b3f0ce7172358f8b6531d51b269
eth: sp7021: fix use after free bug in spl2sw_nvmem_get_mac_address

This frees "mac" and tries to display its address as part of the error
message on the next line.  Swap the order.

Fixes: 22c7792aa072 ("net: ethernet: Add driver for Sunplus SP7021")
Signed-off-by: Zheng Wang <zyytlz.wz@163.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sunplus/spl2sw_driver.c