summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2017-12-08 21:59:06 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2017-12-08 21:59:06 +0000
commitb65e33ed0868f013509800934a7cfc15bbef3765 (patch)
tree0b95869700ead9700078e608c29c1fe96be26e17
parent9f5605f8a87aab87985eda82afbd5f5ede3d6598 (diff)
Use m_freem() in error case. Found by Maxime Villard
OK bluhm@
-rw-r--r--sys/netmpls/mpls_input.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netmpls/mpls_input.c b/sys/netmpls/mpls_input.c
index 20c395e44be..c7b5c0d4a15 100644
--- a/sys/netmpls/mpls_input.c
+++ b/sys/netmpls/mpls_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpls_input.c,v 1.63 2017/12/08 21:56:22 claudio Exp $ */
+/* $OpenBSD: mpls_input.c,v 1.64 2017/12/08 21:59:05 claudio Exp $ */
/*
* Copyright (c) 2008 Claudio Jeker <claudio@openbsd.org>
@@ -313,7 +313,7 @@ mpls_ip_adjttl(struct mbuf *m, u_int8_t ttl)
}
/* make sure we have a valid header */
if (in_cksum(m, hlen) != 0) {
- m_free(m);
+ m_freem(m);
return NULL;
}