From: Marcus Sundberg <marcus@ingate.com>
To: Harald Welte <laforge@netfilter.org>
Cc: Netfilter Development Mailinglist <netfilter-devel@lists.netfilter.org>
Subject: [PATCH] Missing free on error in iptables 1.3.4
Date: Wed, 09 Nov 2005 16:15:06 +0100 [thread overview]
Message-ID: <4372127A.7040307@ingate.com> (raw)
Hi,
the patch below fixes a missing free() statement in TC_COMMIT(),
and moves the setting of errno to come right before the return.
//Marcus
--- iptables.4490/libiptc/libiptc.c (revision 4490)
+++ iptables/libiptc/libiptc.c (working copy)
@@ -2081,9 +2081,10 @@
ret = iptcc_compile_table(*handle, repl);
if (ret < 0) {
- errno = ret;
free(repl->counters);
free(repl);
+ free(newcounters);
+ errno = ret;
return 0;
}
Signed-off-by: Marcus Sundberg <marcus@ingate.com>
--
---------------------------------------+--------------------------
Marcus Sundberg <marcus@ingate.com> | Firewalls with SIP & NAT
Software Developer, Ingate Systems AB | http://www.ingate.com/
next reply other threads:[~2005-11-09 15:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-09 15:15 Marcus Sundberg [this message]
2005-11-12 10:28 ` [PATCH] Missing free on error in iptables 1.3.4 Harald Welte
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=4372127A.7040307@ingate.com \
--to=marcus@ingate.com \
--cc=laforge@netfilter.org \
--cc=netfilter-devel@lists.netfilter.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.