From dec5aaf12856991d6d47b8081f205bad027afd79 Mon Sep 17 00:00:00 2001 From: kimocoder Date: Thu, 19 Sep 2019 14:14:33 +0000 Subject: [PATCH] Protect against pfhdr NULL --- core/rtw_recv.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/rtw_recv.c b/core/rtw_recv.c index 9b5707c..3dd146b 100644 --- a/core/rtw_recv.c +++ b/core/rtw_recv.c @@ -2695,6 +2695,10 @@ union recv_frame *recvframe_defrag(_adapter *adapter, _queue *defrag_q) plist = get_next(phead); prframe = LIST_CONTAINOR(plist, union recv_frame, u); pfhdr = &prframe->u.hdr; + if (!pfhdr) { + pr_err("pfhdr NULL in %s\n", __func__); + return NULL; + } rtw_list_delete(&(prframe->u.list)); if (curfragnum != pfhdr->attrib.frag_num) {