From f5a29914e7a94d1a4ba4c6664c60d8de9e783e63 Mon Sep 17 00:00:00 2001 From: Gavin Li Date: Fri, 24 Jan 2020 16:32:51 -0800 Subject: [PATCH] Avoid dereference of uninitialized pointer in rtw_ndev_notifier_call() This should fix some of the crashes. --- os_dep/linux/os_intfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index ce63893..f9072b3 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -1428,7 +1428,7 @@ static u8 is_rtw_ndev(struct net_device *ndev) static int rtw_ndev_notifier_call(struct notifier_block *nb, unsigned long state, void *ptr) { struct net_device *ndev; - _adapter *adapter = rtw_netdev_priv(ndev); + _adapter *adapter; if (ptr == NULL) return NOTIFY_DONE;