Commit 2674c158 authored by Sven Eckelmann's avatar Sven Eckelmann

batman-adv: Remove vis info on hashing errors

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: default avatarSven Eckelmann <sven@narfation.org>
parent dd58ddc6
...@@ -444,7 +444,7 @@ static struct vis_info *add_packet(struct bat_priv *bat_priv, ...@@ -444,7 +444,7 @@ static struct vis_info *add_packet(struct bat_priv *bat_priv,
info); info);
if (hash_added < 0) { if (hash_added < 0) {
/* did not work (for some reason) */ /* did not work (for some reason) */
kref_put(&old_info->refcount, free_info); kref_put(&info->refcount, free_info);
info = NULL; info = NULL;
} }
......
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