From: Antonio Quartulli <antonio@meshcoding.com>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Antonio Quartulli <antonio@open-mesh.com>
Subject: [B.A.T.M.A.N.] [PATCH maint 2/2] batman-adv: free skb on TVLV parsing success
Date: Tue, 11 Feb 2014 17:05:07 +0100 [thread overview]
Message-ID: <1392134707-2318-2-git-send-email-antonio@meshcoding.com> (raw)
In-Reply-To: <1392134707-2318-1-git-send-email-antonio@meshcoding.com>
From: Antonio Quartulli <antonio@open-mesh.com>
When the TVLV parsing routine succeed the skb is left
untouched thus leading to a memory leak.
Fix this by consuming the skb in case of success.
Introduced by 0b6aa0d43767889eeda43a132cf5e73df4e63bf2
("batman-adv: tvlv - basic infrastructure")
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
---
routing.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/routing.c b/routing.c
index f7579d0..71bf698 100644
--- a/routing.c
+++ b/routing.c
@@ -1063,6 +1063,8 @@ int batadv_recv_unicast_tvlv(struct sk_buff *skb,
if (ret != NET_RX_SUCCESS)
ret = batadv_route_unicast_packet(skb, recv_if);
+ else
+ consume_skb(skb);
return ret;
}
--
1.8.5.3
next prev parent reply other threads:[~2014-02-11 16:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-11 16:05 [B.A.T.M.A.N.] [PATCH maint 1/2] batman-adv: fix TT CRC computation by ensuring byte order Antonio Quartulli
2014-02-11 16:05 ` Antonio Quartulli [this message]
2014-02-11 17:13 ` [B.A.T.M.A.N.] [PATCH maint 2/2] batman-adv: free skb on TVLV parsing success Russell Senior
2014-02-15 0:36 ` Marek Lindner
2014-02-11 16:56 ` [B.A.T.M.A.N.] [PATCH maint 1/2] batman-adv: fix TT CRC computation by ensuring byte order Antonio Quartulli
2014-02-11 17:31 ` Russell Senior
2014-02-15 0:29 ` Marek Lindner
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=1392134707-2318-2-git-send-email-antonio@meshcoding.com \
--to=antonio@meshcoding.com \
--cc=antonio@open-mesh.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.