batman-adv: check return value for hash_add()

if hash_add() fails, we should remove the structure to avoid memory
leaks.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Acked-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
This commit is contained in:
Simon Wunderlich 2011-11-02 20:26:45 +01:00 • committed by Sven Eckelmann
commit 80b3f58cf4