Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 02 Feb 2019 19:45:57 +0200
From:      "Andriy Voskoboinyk" <avos@freebsd.org>
To:        "Rodney W. Grimes" <freebsd@pdx.rh.cn85.dnsmgr.net>, rgrimes@freebsd.org
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r343682 - head/sys/dev/wtap
Message-ID:  <op.zwliavrr4dikkl@localhost>
In-Reply-To: <201902021743.x12HhVRH028585@pdx.rh.CN85.dnsmgr.net>
References:  <201902021743.x12HhVRH028585@pdx.rh.CN85.dnsmgr.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Sat, 02 Feb 2019 19:43:31 +0200 =D0=B1=D1=83=D0=BB=D0=BE =D0=BD=D0=B0=D0=
=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=BE Rodney W. Grimes  =

<freebsd@pdx.rh.cn85.dnsmgr.net>:

>> Sat, 02 Feb 2019 19:25:56 +0200 ???? ???????? Rodney W. Grimes
>> <freebsd@pdx.rh.cn85.dnsmgr.net>:
>>
>> >> Author: avos
>> >> Date: Sat Feb  2 16:15:46 2019
>> >> New Revision: 343682
>> >> URL: https://svnweb.freebsd.org/changeset/base/343682
>> >>
>> >> Log:
>> >>   sys/dev/wtap: Check return value from malloc(..., M_NOWAIT) and
>> >>   drop unneeded cast.
>> >>
>> >>   MFC after:	3 days
>> >>
>> >> Modified:
>> >>   head/sys/dev/wtap/if_wtap.c
>> >>
>> >> Modified: head/sys/dev/wtap/if_wtap.c
>> >>  =

>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D
>> >> --- head/sys/dev/wtap/if_wtap.c	Sat Feb  2 16:07:56 2019	(r343681)=

>> >> +++ head/sys/dev/wtap/if_wtap.c	Sat Feb  2 16:15:46 2019	(r343682)=

>> >> @@ -373,7 +373,7 @@ wtap_vap_delete(struct ieee80211vap *vap)
>> >>  	destroy_dev(avp->av_dev);
>> >>  	callout_stop(&avp->av_swba);
>> >>  	ieee80211_vap_detach(vap);
>> >> -	free((struct wtap_vap*) vap, M_80211_VAP);
>> >> +	free(avp, M_80211_VAP);
>> >
>> > First one crees vap, second one frees avp, is that a typo, or inten=
ded
>> > change?
>>
>> ieee80211_vap_detach() will not free the vap, it will free only some
>> (internal) vap structures.
>
> Your commit message only states "drop unneeded cast",
> it does not mention the function change of no longering freeing vap.

Ah, I see where things are getting confused; actually, avp =3D=3D vap:
if_wtapvar.h:
#define WTAP_VAP(vap)   ((struct wtap_vap *)(vap))

and the start of the function:
struct wtap_vap *avp =3D WTAP_VAP(vap);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?op.zwliavrr4dikkl>