Skip to content

Commit

Permalink
batman-adv: Remove vis info on hashing errors
Browse files Browse the repository at this point in the history
A newly created vis info object must be removed when it couldn't be
added to the hash. The old_info which has to be replaced was already
removed and isn't related to the hash anymore.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
  • Loading branch information
Sven Eckelmann committed Jan 30, 2011
1 parent dd58ddc commit 2674c15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/batman-adv/vis.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ static struct vis_info *add_packet(struct bat_priv *bat_priv,
info);
if (hash_added < 0) {
/* did not work (for some reason) */
kref_put(&old_info->refcount, free_info);
kref_put(&info->refcount, free_info);
info = NULL;
}

Expand Down

0 comments on commit 2674c15

Please sign in to comment.