aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/if_ether.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/if_ether.c')
-rw-r--r--sys/netinet/if_ether.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index 2f92d623feeb..5400f35d953f 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -418,6 +418,7 @@ arprequest_internal(struct ifnet *ifp, const struct in_addr *sip,
linkhdrsize = sizeof(linkhdr);
error = arp_fillheader(ifp, ah, 1, linkhdr, &linkhdrsize);
if (error != 0 && error != EAFNOSUPPORT) {
+ m_freem(m);
ARP_LOG(LOG_ERR, "Failed to calculate ARP header on %s: %d\n",
if_name(ifp), error);
return (error);
@@ -1128,7 +1129,7 @@ reply:
if (error != 0 && error != EAFNOSUPPORT) {
ARP_LOG(LOG_ERR, "Failed to calculate ARP header on %s: %d\n",
if_name(ifp), error);
- return;
+ goto drop;
}
ro.ro_prepend = linkhdr;