Răsfoiți Sursa

batman-adv: Remove vis info element in free_info

The free_info function will be called when no reference to the info
object exists anymore. It must be ensured that the allocated memory
gets freed and not only the elements which are managed by the info
object.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Sven Eckelmann 14 ani în urmă
părinte
comite
dda9fc6b2c
1 a modificat fișierele cu 1 adăugiri și 0 ștergeri
  1. 1 0
      net/batman-adv/vis.c

+ 1 - 0
net/batman-adv/vis.c

@@ -64,6 +64,7 @@ static void free_info(struct kref *ref)
 
 
 	spin_unlock_bh(&bat_priv->vis_list_lock);
 	spin_unlock_bh(&bat_priv->vis_list_lock);
 	kfree_skb(info->skb_packet);
 	kfree_skb(info->skb_packet);
+	kfree(info);
 }
 }
 
 
 /* Compare two vis packets, used by the hashing algorithm */
 /* Compare two vis packets, used by the hashing algorithm */