summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>2001-07-02 19:19:50 +0000
committerNiels Provos <provos@cvs.openbsd.org>2001-07-02 19:19:50 +0000
commit1e28adab099984a75f106496c93034ef893cb5b6 (patch)
tree55a8adbb5af33ab3c0c1feff459dddd88b753929 /sys
parentb093bc46c57ebda8da193cbc746d127c67d86ece (diff)
another memory leak
Diffstat (limited to 'sys')
-rw-r--r--sys/net/pf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c
index d7327444372..3e27052b301 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.94 2001/07/02 19:18:40 provos Exp $ */
+/* $OpenBSD: pf.c,v 1.95 2001/07/02 19:19:49 provos Exp $ */
/*
* Copyright (c) 2001, Daniel Hartmeier
@@ -1280,8 +1280,10 @@ pf_send_icmp(struct mbuf *m, u_int8_t type, u_int8_t code)
if (mtag == NULL)
return;
m0 = m_copy(m, 0, M_COPYALL);
- if (m0 == NULL)
+ if (m0 == NULL) {
+ m_tag_free(mtag);
return;
+ }
m_tag_prepend(m0, mtag);
icmp_error(m0, type, code, 0, 0);
}