summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorXiyu Yang <xiyuyang19@fudan.edu.cn>2020-04-20 13:37:20 +0800
committerSimon Wunderlich <sw@simonwunderlich.de>2020-04-21 10:08:05 +0200
commit6f91a3f7af4186099dd10fa530dd7e0d9c29747d (patch)
tree7f76b849948c75ccd7d374b08f9cf61d3fc7b51d /scripts
parent6107c5da0fca8b50b4d3215e94d619d38cc4a18c (diff)
downloadlinux-6f91a3f7af4186099dd10fa530dd7e0d9c29747d.tar.bz2
batman-adv: Fix refcnt leak in batadv_v_ogm_process
batadv_v_ogm_process() invokes batadv_hardif_neigh_get(), which returns a reference of the neighbor object to "hardif_neigh" with increased refcount. When batadv_v_ogm_process() returns, "hardif_neigh" becomes invalid, so the refcount should be decreased to keep refcount balanced. The reference counting issue happens in one exception handling paths of batadv_v_ogm_process(). When batadv_v_ogm_orig_get() fails to get the orig node and returns NULL, the refcnt increased by batadv_hardif_neigh_get() is not decreased, causing a refcnt leak. Fix this issue by jumping to "out" label when batadv_v_ogm_orig_get() fails to get the orig node. Fixes: 9323158ef9f4 ("batman-adv: OGMv2 - implement originators logic") Signed-off-by: Xiyu Yang <xiyuyang19@fudan.edu.cn> Signed-off-by: Xin Tan <tanxin.ctf@gmail.com> Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions