netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: kaber@trash.net
Subject: [PATCH 1/3 iptables,xlate4] libxtables: fix leak in xt_buf object
Date: Mon,  1 Feb 2016 19:43:34 +0100	[thread overview]
Message-ID: <1454352216-18812-1-git-send-email-pablo@netfilter.org> (raw)

Release data area that is allocated by xt_buf_alloc().

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 libxtables/xtables.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libxtables/xtables.c b/libxtables/xtables.c
index fa979f2..21e515d 100644
--- a/libxtables/xtables.c
+++ b/libxtables/xtables.c
@@ -2015,6 +2015,7 @@ struct xt_buf *xt_buf_alloc(int size)
 
 void xt_buf_free(struct xt_buf *buf)
 {
+	free(buf->data);
 	free(buf);
 }
 
-- 
2.1.4


             reply	other threads:[~2016-02-01 18:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-01 18:43 Pablo Neira Ayuso [this message]
2016-02-01 18:43 ` [PATCH 2/3 iptables,xlate4] extensions: rename xt_buf to xt_xlate Pablo Neira Ayuso
2016-02-01 18:43 ` [PATCH 3/3 iptables,xlate4] xtables: add xt_xlate_add_comment() Pablo Neira Ayuso

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=1454352216-18812-1-git-send-email-pablo@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).