diff options
author | 2001-07-02 19:18:40 +0000 | |
---|---|---|
committer | 2001-07-02 19:18:40 +0000 | |
commit | d5fbf75d7e6b5409b28c2da4a656f550e9039ae2 (patch) | |
tree | 0d17e0421a49c45ba4628a1f5e970cab95f2bd43 | |
parent | sync (diff) | |
download | wireguard-openbsd-d5fbf75d7e6b5409b28c2da4a656f550e9039ae2.tar.xz wireguard-openbsd-d5fbf75d7e6b5409b28c2da4a656f550e9039ae2.zip |
fix memory leak
-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; |