diff options
author | Niels Provos <provos@cvs.openbsd.org> | 2001-07-02 19:18:41 +0000 |
---|---|---|
committer | Niels Provos <provos@cvs.openbsd.org> | 2001-07-02 19:18:41 +0000 |
commit | b093bc46c57ebda8da193cbc746d127c67d86ece (patch) | |
tree | e6e9cc6eb895b11f06051402a7438c6232b816d4 /sys/net | |
parent | a0e0cf7b5b994ef22b028b5492cb410997d5e0bc (diff) |
fix memory leak
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/pf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c index 83d48ba787f..d7327444372 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.93 2001/07/01 23:31:31 dugsong Exp $ */ +/* $OpenBSD: pf.c,v 1.94 2001/07/02 19:18:40 provos Exp $ */ /* * Copyright (c) 2001, Daniel Hartmeier @@ -1221,8 +1221,10 @@ pf_send_reset(struct ip *h, int off, struct tcphdr *th) if (mtag == NULL) return; m = m_gethdr(M_DONTWAIT, MT_HEADER); - if (m == NULL) + if (m == NULL) { + m_tag_free(mtag); return; + } m_tag_prepend(m, mtag); m->m_data += max_linkhdr; m->m_pkthdr.len = m->m_len = len; |