Commit 0d15bece authored by Matthias Schiffer's avatar Matthias Schiffer Committed by Antonio Quartulli

batman-adv: fix skb leak in batadv_dat_snoop_incoming_arp_reply()

The callers of batadv_dat_snoop_incoming_arp_reply() assume the skb has been
freed when it returns true; fix this by calling kfree_skb before returning as
it is done in batadv_dat_snoop_incoming_arp_request().
Signed-off-by: default avatarMatthias Schiffer <mschiffer@universe-factory.net>
Signed-off-by: default avatarMarek Lindner <lindner_marek@yahoo.de>
Acked-by: default avatarAntonio Quartulli <ordex@autistici.org>
Signed-off-by: default avatarAntonio Quartulli <ordex@autistici.org>
parent 1591ab67
...@@ -1012,6 +1012,8 @@ bool batadv_dat_snoop_incoming_arp_reply(struct batadv_priv *bat_priv, ...@@ -1012,6 +1012,8 @@ bool batadv_dat_snoop_incoming_arp_reply(struct batadv_priv *bat_priv,
*/ */
ret = !batadv_is_my_client(bat_priv, hw_dst); ret = !batadv_is_my_client(bat_priv, hw_dst);
out: out:
if (ret)
kfree_skb(skb);
/* if ret == false -> packet has to be delivered to the interface */ /* if ret == false -> packet has to be delivered to the interface */
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment