From f1d918f10902e8ba85e557c9f0499c8de775e87e Mon Sep 17 00:00:00 2001 From: bluhm Date: Wed, 24 Feb 2021 13:19:48 +0000 Subject: [PATCH] In sorflush() use m_purge() instead of handrolling it. no objections mvs@ --- sys/kern/uipc_socket.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 71f2a49ca17..861b15d6d2f 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket.c,v 1.255 2021/02/18 11:40:19 mvs Exp $ */ +/* $OpenBSD: uipc_socket.c,v 1.256 2021/02/24 13:19:48 bluhm Exp $ */ /* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */ /* @@ -1133,8 +1133,7 @@ sorflush(struct socket *so) sb->sb_timeo_nsecs = INFSLP; if (pr->pr_flags & PR_RIGHTS && pr->pr_domain->dom_dispose) (*pr->pr_domain->dom_dispose)(m); - while (m != NULL) - m = m_freem(m); + m_purge(m); } #ifdef SOCKET_SPLICE -- 2.20.1