Re: [PATCH net] batman-adv: Fix memory leak on tt add with invalid vlan

2015-08-18 Thread David Miller
From: Sven Eckelmann Date: Tue, 18 Aug 2015 13:37:01 +0200 > The object tt_local is allocated with kmalloc and not initialized when the > function batadv_tt_local_add checks for the vlan. But this function can > only cleanup the object when the (not yet initialized) reference counter of > the obj

[PATCH net] batman-adv: Fix memory leak on tt add with invalid vlan

2015-08-18 Thread Sven Eckelmann
The object tt_local is allocated with kmalloc and not initialized when the function batadv_tt_local_add checks for the vlan. But this function can only cleanup the object when the (not yet initialized) reference counter of the object is 1. This is unlikely and thus the object would leak when the vl