Searched hist:f665fa7e85e9e32deadc8aee35c958334c812d8d (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/net/batman-adv/ |
H A D | gateway_client.c | diff f665fa7e85e9e32deadc8aee35c958334c812d8d Fri Jul 15 10:39:27 CDT 2016 Sven Eckelmann <sven@narfation.org> batman-adv: Place kref_get for gw_node near use
It is hard to understand why the refcnt is increased when it isn't done near the actual place the new reference is used. So using kref_get right before the place which requires the reference and in the same function helps to avoid accidental problems caused by incorrect reference counting.
Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
|