diff mbox

iptables: missing free() in function cache_add_entry()

Message ID 20120308152037.639adf51@frequentis.com
State Accepted
Headers show

Commit Message

Christian Engelmayer March 8, 2012, 2:20 p.m. UTC
From: Franz Flasch <franz.flasch@frequentis.com>

Fixed a memory leak in the error path of function cache_add_entry().

Signed-off-by: Franz Flasch <franz.flasch@frequentis.com>
Signed-off-by: Christian Engelmayer <christian.engelmayer@frequentis.com>
---

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Pablo Neira Ayuso March 12, 2012, 12:09 p.m. UTC | #1
On Thu, Mar 08, 2012 at 03:20:37PM +0100, Christian Engelmayer wrote:
> From: Franz Flasch <franz.flasch@frequentis.com>
> 
> Fixed a memory leak in the error path of function cache_add_entry().

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- iptables-1.4.12.2/libiptc/libiptc.c	2012-01-02 18:19:09.000000000 +0100
+++ iptables-1.4.12.2-modified/libiptc/libiptc.c	2012-03-08 14:24:24.000000000 +0100
@@ -1012,6 +1012,7 @@  new_rule:
 			if (t->target.u.target_size
 			    != ALIGN(sizeof(STRUCT_STANDARD_TARGET))) {
 				errno = EINVAL;
+				free(r);
 				return -1;
 			}