]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
iptables: missing free() in function cache_add_entry()
authorFranz Flasch <franz.flasch@frequentis.com>
Thu, 8 Mar 2012 04:20:37 +0000 (04:20 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 12 Mar 2012 11:57:49 +0000 (12:57 +0100)
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>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
libiptc/libiptc.c

index 63fcfc2afc1c21931a775619852ac7ed10820db8..396bc8f5f2338a8a7bc38d48bc281e985850ceb7 100644 (file)
@@ -1003,6 +1003,7 @@ new_rule:
                        if (t->target.u.target_size
                            != ALIGN(sizeof(STRUCT_STANDARD_TARGET))) {
                                errno = EINVAL;
+                               free(r);
                                return -1;
                        }