diff options
author | glebius <glebius@FreeBSD.org> | 2010-07-06 10:45:38 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2010-07-06 10:45:38 +0000 |
commit | ffe13fc70526df50c4b8f7c0b7c83630c6fad5bf (patch) | |
tree | 4f05c7fa764374601cb5d9ccbe16ac76b50eb844 /sys/netgraph | |
parent | 05f71bf7df1979d094d54bfb3e8f1c67f6f831f4 (diff) | |
download | FreeBSD-src-ffe13fc70526df50c4b8f7c0b7c83630c6fad5bf.zip FreeBSD-src-ffe13fc70526df50c4b8f7c0b7c83630c6fad5bf.tar.gz |
Avoid double-free. In error cases ipfw(4) frees the mbuf(4), we don't
need to.
PR: kern/145462
Diffstat (limited to 'sys/netgraph')
-rw-r--r-- | sys/netgraph/ng_ipfw.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sys/netgraph/ng_ipfw.c b/sys/netgraph/ng_ipfw.c index 18dd537..8493883 100644 --- a/sys/netgraph/ng_ipfw.c +++ b/sys/netgraph/ng_ipfw.c @@ -265,11 +265,8 @@ ng_ipfw_input(struct mbuf **m0, int dir, struct ip_fw_args *fwa, int tee) * Node must be loaded and corresponding hook must be present. */ if (fw_node == NULL || - (hook = ng_ipfw_findhook1(fw_node, fwa->rule.info)) == NULL) { - if (tee == 0) - m_freem(*m0); + (hook = ng_ipfw_findhook1(fw_node, fwa->rule.info)) == NULL) return (ESRCH); /* no hook associated with this rule */ - } /* * We have two modes: in normal mode we add a tag to packet, which is |