Index | Thread | Search

From:
Jonathan Gray <jsg@jsg.id.au>
Subject:
correct klist_free() argument in pppxclose()
To:
tech@openbsd.org
Date:
Wed, 23 Oct 2024 01:32:43 +1100

Download raw body.

Thread
free in the same order as pppacclose()

klist_free() is just KASSERT(SLIST_EMPTY(
so this problem is harmless

Index: sys/net/if_pppx.c
===================================================================
RCS file: /cvs/src/sys/net/if_pppx.c,v
diff -u -p -r1.131 if_pppx.c
--- sys/net/if_pppx.c	20 Sep 2024 02:00:46 -0000	1.131
+++ sys/net/if_pppx.c	22 Oct 2024 14:26:08 -0000
@@ -562,7 +562,7 @@ pppxclose(dev_t dev, int flags, int mode
 	mq_purge(&pxd->pxd_svcq);
 
 	klist_free(&pxd->pxd_rklist);
-	klist_free(&pxd->pxd_rklist);
+	klist_free(&pxd->pxd_wklist);
 
 	free(pxd, M_DEVBUF, sizeof(*pxd));