batman-adv: avoid double free when orig_node initialization fails
authorAntonio Quartulli <antonio@meshcoding.com>
Sat, 15 Feb 2014 01:17:20 +0000 (02:17 +0100)
committerAntonio Quartulli <antonio@meshcoding.com>
Mon, 17 Feb 2014 16:17:02 +0000 (17:17 +0100)
commit64fe34649c0417f8c206027b5c0496ede71b889b
tree8f456b9e7f4cfb8efde3af1ce47f96321cc17d94
parentea6eaac6c33d96553ca7008e997bfc037e706c72
batman-adv: avoid double free when orig_node initialization fails

In the failure path of the orig_node initialization routine
the orig_node->bat_iv.bcast_own field is free'd twice: first
in batadv_iv_ogm_orig_get() and then later in
batadv_orig_node_free_rcu().

Fix it by removing the kfree in batadv_iv_ogm_orig_get().

Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
net/batman-adv/bat_iv_ogm.c