Index | Thread | Search

From:
Vitaliy Makkoveev <mvs@openbsd.org>
Subject:
Re: correct klist_free() argument in pppxclose()
To:
tech@openbsd.org
Date:
Tue, 22 Oct 2024 18:12:20 +0300

Download raw body.

Thread
On Wed, Oct 23, 2024 at 01:32:43AM +1100, Jonathan Gray wrote:
> free in the same order as pppacclose()
> 
> klist_free() is just KASSERT(SLIST_EMPTY(
> so this problem is harmless
> 

ok mvs

> 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));
>  
>