linux/drivers/net/ethernet/qlogic
Colin Ian King 1dc2b3d655 qede: fix write to free'd pointer error and double free of ptp
The err2 error return path calls qede_ptp_disable that cleans up
on an error and frees ptp. After this, the free'd ptp is dereferenced
when ptp->clock is set to NULL and the code falls-through to error
path err1 that frees ptp again.

Fix this by calling qede_ptp_disable and exiting via an error
return path that does not set ptp->clock or kfree ptp.

Addresses-Coverity: ("Write to pointer after free")
Fixes: 035744975a ("qede: Add support for PTP resource locking.")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-12 16:55:47 -07:00
..
netxen net: netxen: fix a missing check and an uninitialized use 2018-12-21 09:01:47 -08:00
qed qed: Read device port count from the shmem 2019-02-21 10:51:08 -08:00
qede qede: fix write to free'd pointer error and double free of ptp 2019-04-12 16:55:47 -07:00
qlcnic qlogic: qlcnic: fix use of SPEED_UNKNOWN ethtool constant 2019-04-08 16:30:43 -07:00
qlge net: qlge: fix a potential NULL pointer dereference 2019-03-11 16:16:22 -07:00
Kconfig qed*: Utilize FW 8.33.1.0 2018-01-02 13:59:16 -05:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
qla3xxx.c net: qlogic: fix a potential NULL pointer dereference 2019-03-12 14:44:43 -07:00
qla3xxx.h