提交 ea32f065 编写于 作者: S Sudip Mukherjee 提交者: Johannes Berg

mac80211: fix memory leak

On error we jumped to the error label and returned the error code but we
missed releasing sinfo.

Fixes: 5fe74014172d ("mac80211: avoid excessive stack usage in sta_info")
Reviewed-by: NJulian Calaby <julian.calaby@gmail.com>
Signed-off-by: NSudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 23665aaf
...@@ -562,6 +562,7 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU) ...@@ -562,6 +562,7 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)
__cleanup_single_sta(sta); __cleanup_single_sta(sta);
out_err: out_err:
mutex_unlock(&local->sta_mtx); mutex_unlock(&local->sta_mtx);
kfree(sinfo);
rcu_read_lock(); rcu_read_lock();
return err; return err;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册