From: Jesper Juhl Date: Sat, 14 Jan 2012 20:52:17 +0000 (+0100) Subject: Net, mac80211: Fix resource leak in ieee80211_rx_h_mesh_fwding() X-Git-Tag: v3.3-rc1~17^2~6^2~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74b8cc3d592e5e884123eb99960a9f064223eaab;p=pandora-kernel.git Net, mac80211: Fix resource leak in ieee80211_rx_h_mesh_fwding() We may leak the 'fwd_skb' we skb_copy() in ieee80211_rx_h_mesh_fwding() if we take the 'else' branch in the 'if' statement just below. If we take that branch we'll end up returning from the function and since we've not assigned 'fwd_skb' to anything at that point, we leak it when the variable goes out of scope. The simple fix seems to be to just kfree_skb(fwd_skb); just before we return. That is what this patch does. Signed-off-by: Jesper Juhl Signed-off-by: John W. Linville --- Reading git-diff-tree failed