prevent init_timer from accessing a NULL pointer
This commit is contained in:
parent
4d9b26dd04
commit
4f76bfe799
@ -1201,7 +1201,7 @@ void rtw_init_timer(_timer *ptimer, void *padapter, void *pfunc, void *ctx)
|
||||
_adapter *adapter = (_adapter *)padapter;
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
_init_timer(ptimer, adapter->pnetdev, pfunc, ctx);
|
||||
_init_timer(ptimer, adapter ? adapter->pnetdev : NULL, pfunc, ctx);
|
||||
#endif
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
_init_timer(ptimer, adapter->pifp, pfunc, ctx);
|
||||
|
Loading…
x
Reference in New Issue
Block a user