From owner-svn-src-all@freebsd.org Sat Feb 2 17:54:22 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 8099D14C5E90; Sat, 2 Feb 2019 17:54:22 +0000 (UTC) (envelope-from andriyvos@gmail.com) Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ECCD79197D; Sat, 2 Feb 2019 17:54:21 +0000 (UTC) (envelope-from andriyvos@gmail.com) Received: by mail-lj1-f175.google.com with SMTP id k15-v6so8473402ljc.8; Sat, 02 Feb 2019 09:54:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:subject:references:date:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; bh=9t1c6HLrKw4KELTd4+bCXhXQSz5uhnuSNYu9U/49x9U=; b=MTkh5W2950RV0G91xkCJGEp2OgHsK0hATwdMblammigu5DVPohI4k+B2cmPD7frwvw Uq8wNJcJ9R8yqrheiycBMaEHNDcYZDNmLllCSGS0Oqen5EQ/PwERwQJ2UDAsC/G+8kH6 Yh8sQXJ6BgVzucUCOsFYxirbK6aLGFm6hZctvX+xh+kltd2urICvxLGN0EQLe3A0z5He Z9ETkKJrOM/95BfA5PK88PA7rbJIPredhDRwWSSrf7uussMyuL0fox/DkP9liU3UKrGv 19NvF5ys7+kf3swjdaGC6Wa0iRQVaqEJ/JhqPhhFHe9gO2Si6G821tf9Ag17SV5P9GpM Do2w== X-Gm-Message-State: AJcUukdO0OCRs2lbDRNVht+JZAmuZkvhkBaPHHnSK3h9gPlAxeeKfB7J BvZ0/fsG3xB7L58zhWtJTbM= X-Google-Smtp-Source: ALg8bN7gUDICzjvJcmd2FPdLPp4km1DbNNVwUT0dpauQ41zEStQ6BcvZ6UB20R/aFonXMIShFs3IDg== X-Received: by 2002:a2e:5054:: with SMTP id v20-v6mr35876521ljd.45.1549129604680; Sat, 02 Feb 2019 09:46:44 -0800 (PST) Received: from localhost ([37.73.131.213]) by smtp.gmail.com with ESMTPSA id p67sm2027204lfe.14.2019.02.02.09.46.43 (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 02 Feb 2019 09:46:44 -0800 (PST) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Rodney W. Grimes" , 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 References: <201902021743.x12HhVRH028585@pdx.rh.CN85.dnsmgr.net> Date: Sat, 02 Feb 2019 19:45:57 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: Quoted-Printable From: "Andriy Voskoboinyk" Message-ID: In-Reply-To: <201902021743.x12HhVRH028585@pdx.rh.CN85.dnsmgr.net> User-Agent: Opera Mail/12.15 (FreeBSD) X-Rspamd-Queue-Id: ECCD79197D X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] 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:54:22 -0000 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 = : >> 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 >> >> = >> =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);