OSDN Git Service

rtl8180: avoid potential NULL deref in rtl8180_beacon_work
[uclinux-h8/linux.git] / drivers / net / wireless / rtl818x / rtl8180_dev.c
index 1d81785..b50c39a 100644 (file)
@@ -695,6 +695,8 @@ static void rtl8180_beacon_work(struct work_struct *work)
 
        /* grab a fresh beacon */
        skb = ieee80211_beacon_get(dev, vif);
+       if (!skb)
+               goto resched;
 
        /*
         * update beacon timestamp w/ TSF value