Browse Source

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: Sven Eckelmann <sven@narfation.org>
Sven Eckelmann 14 years ago
parent
commit
2674c15870
1 changed files with 1 additions and 1 deletions
  1. 1 1
      net/batman-adv/vis.c

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

@@ -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;
 	}