Skip to content

Commit

Permalink
batman-adv: Remove vis info element in free_info
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sven Eckelmann committed Jan 30, 2011
1 parent 2674c15 commit dda9fc6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/batman-adv/vis.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ static void free_info(struct kref *ref)

spin_unlock_bh(&bat_priv->vis_list_lock);
kfree_skb(info->skb_packet);
kfree(info);
}

/* Compare two vis packets, used by the hashing algorithm */
Expand Down

0 comments on commit dda9fc6

Please sign in to comment.