From 85464cee49a39cdc050fb5c3822e8773fb184a91 Mon Sep 17 00:00:00 2001 From: claudio Date: Fri, 8 Dec 2017 21:59:05 +0000 Subject: [PATCH] Use m_freem() in error case. Found by Maxime Villard OK bluhm@ --- sys/netmpls/mpls_input.c | 4 ++-- 1 file 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 @@ -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; } -- 2.20.1