cfg80211: fix NULL ptr deref
[safe/jmp/linux-2.6] / net / mac80211 / cfg.c
index 4bbf500..5608f6c 100644 (file)
@@ -323,6 +323,8 @@ static void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo)
 {
        struct ieee80211_sub_if_data *sdata = sta->sdata;
 
+       sinfo->generation = sdata->local->sta_generation;
+
        sinfo->filled = STATION_INFO_INACTIVE_TIME |
                        STATION_INFO_RX_BYTES |
                        STATION_INFO_TX_BYTES |
@@ -909,6 +911,8 @@ static void mpath_set_pinfo(struct mesh_path *mpath, u8 *next_hop,
        else
                memset(next_hop, 0, ETH_ALEN);
 
+       pinfo->generation = mesh_paths_generation;
+
        pinfo->filled = MPATH_INFO_FRAME_QLEN |
                        MPATH_INFO_DSN |
                        MPATH_INFO_METRIC |