From owner-svn-src-all@freebsd.org Sat Feb 2 17:43:33 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A29E14C59EE; Sat, 2 Feb 2019 17:43:33 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19EF99138A; Sat, 2 Feb 2019 17:43:32 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x12HhVWT028586; Sat, 2 Feb 2019 09:43:31 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x12HhVRH028585; Sat, 2 Feb 2019 09:43:31 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201902021743.x12HhVRH028585@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r343682 - head/sys/dev/wtap In-Reply-To: To: Andriy Voskoboinyk Date: Sat, 2 Feb 2019 09:43:31 -0800 (PST) CC: rgrimes@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 19EF99138A X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.93 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.93)[-0.927,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Feb 2019 17:43:33 -0000 > Sat, 02 Feb 2019 19:25:56 +0200 ???? ???????? Rodney W. Grimes > : > > >> 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 > >> ============================================================================== > >> --- 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 intended > > 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. Also this is in routine wtap_vap_delete, which I would expect to free all things in the vap, and then free the vap. Why is a delete function only freeing "some (internal) vap structures?" -- Rod Grimes rgrimes@freebsd.org