summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-12-03 16:13:27 -0500
committerDavid S. Miller <davem@davemloft.net>2016-12-03 16:13:27 -0500
commita38b61009425b3882704270e792a6e743f5d9426 (patch)
treed19b50d283f5fb3d0e3d63160aa8ce0981163f36
parent8dc0f265d39a3933f4c1f846c7c694f12a2ab88a (diff)
parentc2d0f48a13e53b4747704c9e692f5e765e52041a (diff)
downloadlinux-stable-a38b61009425b3882704270e792a6e743f5d9426.tar.gz
linux-stable-a38b61009425b3882704270e792a6e743f5d9426.tar.bz2
linux-stable-a38b61009425b3882704270e792a6e743f5d9426.zip
Merge tag 'batadv-net-for-davem-20161202' of git://git.open-mesh.org/linux-merge
Simon Wunderlich says: ==================== Here is another batman-adv bugfix: - fix checking for failed allocation of TVLV blocks in TT local data, by Sven Eckelmann ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/batman-adv/translation-table.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index 7f663092f6de..0dc85eb1cb7a 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -3282,7 +3282,7 @@ static bool batadv_send_my_tt_response(struct batadv_priv *bat_priv,
&tvlv_tt_data,
&tt_change,
&tt_len);
- if (!tt_len)
+ if (!tt_len || !tvlv_len)
goto unlock;
/* Copy the last orig_node's OGM buffer */
@@ -3300,7 +3300,7 @@ static bool batadv_send_my_tt_response(struct batadv_priv *bat_priv,
&tvlv_tt_data,
&tt_change,
&tt_len);
- if (!tt_len)
+ if (!tt_len || !tvlv_len)
goto out;
/* fill the rest of the tvlv with the real TT entries */