Skip to content

Commit 65419eb

Browse files
ecsvgregkh
authored andcommitted
batman-adv: bla: put backbone reference on failed claim hash insert
commit ba9d20e upstream. When batadv_bla_add_claim() fails to insert a new claim into the hash, it leaked a reference to the backbone_gw for which the claim was intended. Call batadv_backbone_gw_put() on the error path to release the reference and avoid leaking the backbone_gw object. Cc: stable@kernel.org Fixes: 3db0dec ("batman-adv: Fix non-atomic bla_claim::backbone_gw access") Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 7b8fbce commit 65419eb

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

net/batman-adv/bridge_loop_avoidance.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,7 @@ static void batadv_bla_add_claim(struct batadv_priv *bat_priv,
723723

724724
if (unlikely(hash_added != 0)) {
725725
/* only local changes happened. */
726+
batadv_backbone_gw_put(backbone_gw);
726727
kfree(claim);
727728
return;
728729
}

0 commit comments

Comments
 (0)