Skip to contentSkip to conversation

mac80211: free sinfo on error path

PATCH In review Dan Carpenter 2 participants 2 messages Jan 30, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: free sinfo on error path

There is a missing kfree(sinfo) on error in sta_info_insert_finish().

Fixes 5fe74014172d ('mac80211: avoid excessive stack usage in sta_info')
net/mac80211/sta_info.c +1 -0
index 6c198e6..1502efb 100644
@@ -562,6 +562,7 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)
  out_err:
 	mutex_unlock(&local->sta_mtx);
 	rcu_read_lock();
+	kfree(sinfo);
 	return err;
 }
 
#1 lore raw
Quoted 4 lines · Dan Carpenter

There is a missing kfree(sinfo) on error in sta_info_insert_finish().

Fixes 5fe74014172d ('mac80211: avoid excessive stack usage in sta_info')

Hi Dan,

A fix for this has already been posted [1]. Although your 'Fixes:' tag is useful to have, I guess.

Regards,
Arend

[1]
http://mid.gmane.org/[email protected]

Quoted 17 lines
net/mac80211/sta_info.c +1 -1
index 6c198e6..1502efb 100644
@@ -562,6 +562,7 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)
  out_err:
 	mutex_unlock(&local->sta_mtx);
 	rcu_read_lock();
+	kfree(sinfo);
 	return err;
 }
 
--

To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html