mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 01:53:29 +02:00
batman-adv: bla: put backbone reference on failed claim hash insert
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: 3db0decf11 ("batman-adv: Fix non-atomic bla_claim::backbone_gw access")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
This commit is contained in:
parent
cf6b604011
commit
ba9d20ee90
|
|
@ -723,6 +723,7 @@ static void batadv_bla_add_claim(struct batadv_priv *bat_priv,
|
|||
|
||||
if (unlikely(hash_added != 0)) {
|
||||
/* only local changes happened. */
|
||||
batadv_backbone_gw_put(backbone_gw);
|
||||
kfree(claim);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user