[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20161103.165357.1889984861158784546.davem@davemloft.net>
Date: Thu, 03 Nov 2016 16:53:57 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: xiyou.wangcong@...il.com
Cc: netdev@...r.kernel.org, kubakici@...pl, johannes@...solutions.net
Subject: Re: [Patch net] genetlink: fix a memory leak on error path
From: Cong Wang <xiyou.wangcong@...il.com>
Date: Thu, 3 Nov 2016 09:42:35 -0700
> In __genl_register_family(), when genl_validate_assign_mc_groups()
> fails, we forget to free the memory we possibly allocate for
> family->attrbuf.
>
> Note, some callers call genl_unregister_family() to clean up
> on error path, it doesn't work because the family is inserted
> to the global list in the nearly last step.
>
> Cc: Jakub Kicinski <kubakici@...pl>
> Cc: Johannes Berg <johannes@...solutions.net>
> Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>
Applied, thanks Cong.
Powered by blists - more mailing lists