From: Antonio Quartulli <ordex@autistici.org>
To: The list for a Better Approach To Mobile Ad-hoc Networking
<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] [PATCH] batman-adv: fix memory leak in batadv_softif_create_vlan()
Date: Thu, 8 Aug 2013 10:27:28 +0200 [thread overview]
Message-ID: <20130808082728.GP2943@ritirata.org> (raw)
In-Reply-To: <201308081255.22537.lindner_marek@yahoo.de>
[-- Attachment #1: Type: text/plain, Size: 878 bytes --]
On Thu, Aug 08, 2013 at 12:55:22PM +0800, Marek Lindner wrote:
> 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 ?
Good point! Thanks!
I think I will move the tt_local_add right below this if loop.
v2 is coming.
Cheers,
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2013-08-08 8:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-07 23:07 [B.A.T.M.A.N.] [PATCH] batman-adv: fix memory leak in batadv_softif_create_vlan() Antonio Quartulli
2013-08-08 4:55 ` Marek Lindner
2013-08-08 8:27 ` Antonio Quartulli [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130808082728.GP2943@ritirata.org \
--to=ordex@autistici.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox