Re: [PATCH] batman-adv: Fix mem leak in the batadv_tt_local_event() function

2012-08-08 Thread David Miller
From: Antonio Quartulli Date: Tue, 7 Aug 2012 20:50:36 +0200 > On Tue, Aug 07, 2012 at 08:32:34PM +0200, Jesper Juhl wrote: >> Memory is allocated for 'tt_change_node' with kmalloc(). >> 'tt_change_node' may go out of scope really being used for anything >> (except have a few members initialized)

Re: [PATCH] batman-adv: Fix mem leak in the batadv_tt_local_event() function

2012-08-07 Thread Antonio Quartulli
On Tue, Aug 07, 2012 at 08:32:34PM +0200, Jesper Juhl wrote: > Memory is allocated for 'tt_change_node' with kmalloc(). > 'tt_change_node' may go out of scope really being used for anything > (except have a few members initialized) if we hit the 'del:' label. > This patch makes sure we free the mem

Re: [PATCH] batman-adv: Fix mem leak in the batadv_tt_local_event() function

2012-08-07 Thread Jesper Juhl
On Tue, 7 Aug 2012, Jesper Juhl wrote: > Memory is allocated for 'tt_change_node' with kmalloc(). > 'tt_change_node' may go out of scope really being used for anything This should of course read "... go out of scope without really being used ..." . > (except have a few members initialized) if we

[PATCH] batman-adv: Fix mem leak in the batadv_tt_local_event() function

2012-08-07 Thread Jesper Juhl
Memory is allocated for 'tt_change_node' with kmalloc(). 'tt_change_node' may go out of scope really being used for anything (except have a few members initialized) if we hit the 'del:' label. This patch makes sure we free the memory in that case. Signed-off-by: Jesper Juhl --- net/batman-adv/tr