From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Marek Lindner Date: Thu, 8 Aug 2013 12:55:22 +0800 References: <1375916848-1874-1-git-send-email-ordex@autistici.org> In-Reply-To: <1375916848-1874-1-git-send-email-ordex@autistici.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201308081255.22537.lindner_marek@yahoo.de> Subject: Re: [B.A.T.M.A.N.] [PATCH] batman-adv: fix memory leak in batadv_softif_create_vlan() Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: The list for a Better Approach To Mobile Ad-hoc Networking On Thursday, August 08, 2013 07:07:28 Antonio Quartulli wrote: > --- a/soft-interface.c > +++ b/soft-interface.c > @@ -466,8 +466,10 @@ int batadv_softif_create_vlan(struct batadv_priv > *bat_priv, unsigned short vid) atomic_set(&vlan->ap_isolation, 0); > > err = batadv_sysfs_add_vlan(bat_priv->soft_iface, vlan); > - if (err) > + if (err) { > + kfree(vlan); > return err; > + } You raise a valid point here but what about the local entry that is added right above ? Does it require cleanup as well ? Cheers, Marek