From owner-svn-src-head@freebsd.org Tue Apr 26 20:24:45 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D183B1D556; Tue, 26 Apr 2016 20:24:45 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi0-x231.google.com (mail-oi0-x231.google.com [IPv6:2607:f8b0:4003:c06::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C2A791A04; Tue, 26 Apr 2016 20:24:44 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi0-x231.google.com with SMTP id r78so27902377oie.0; Tue, 26 Apr 2016 13:24:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=g/ad+D4untkYdQiC/Q3wMdhvdA7cHc1p7b7nE9RXdAM=; b=NdDmNiYop7OaVLzEGrC8yIwaMeMD5BFZyzeCH1nzEa28Vt01s9bn29hFwWWXdAKkYk IWF9iRZCSjtn1u1ye5du89qoi78AhjpvKYUH3Tr14fm8rnKygLQL4QP8ZfDjkOjH6pxD d5qURD0Ide1pHUUAo10mVZZzcWYieeAooj0WID50jcnHXx8Nq+VAsLr6bLyPuQXKyzSM g2tcI8hdCMb6gbp2v6hxA/h3SrUJtzQhkFDDagggvUyYh2q4UwrrDID7rGJ8HDjP8wrn YZDXRpNWFSgiWKBZysdPDkkgwzF20MW7d2R2ePCZLPTyI1VaB+S5G5x3Hyrol2iTRiTY NJPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=g/ad+D4untkYdQiC/Q3wMdhvdA7cHc1p7b7nE9RXdAM=; b=fummzPBzVhcyJ4ORvA7VwHMQxaBLtJrj6MyCAASdPcvmivvW7AjyokYfDy6aDKpCKe Mt1/pI5RYDcHs/BoYCSQV5ovL0kHJNbk/c0qsNALo0t9mL6NVTPLVGCmrQntaeW6qZRE d2gRdwcYWTubR4JUd4nPq3ChYXAvmV6nRGDE+7W3aM5Nh4JVP64ztGsu2ES54ONWVEQs EgQS+B/+plmBZWuY/7O0lkwgH/TobY3jJ/rrtoMl/HLjdDC0n04WN3SmAH1tWyjffMo4 9IpEIfSOpVX3Hu3OVxq6hOjrhMzezryZqsoWvjog5XoP9JPemBVb04Ooj3aJ9LpJ9gz5 lTXw== X-Gm-Message-State: AOPr4FWCqHmnZYXw4U+UJjm0IkvGaPXiR8Fz4KWwydaak0TMrM9XBfyCSEomH5jM1dYywnI3IY6lr7Q7FrOxug== MIME-Version: 1.0 X-Received: by 10.157.38.40 with SMTP id a37mr2009658otb.152.1461702284051; Tue, 26 Apr 2016 13:24:44 -0700 (PDT) Sender: asomers@gmail.com Received: by 10.202.64.138 with HTTP; Tue, 26 Apr 2016 13:24:43 -0700 (PDT) In-Reply-To: References: <201604261811.u3QIBjrE092471@repo.freebsd.org> Date: Tue, 26 Apr 2016 14:24:43 -0600 X-Google-Sender-Auth: fxJbmqIsql7TRhZEaT_8TAeb4js Message-ID: Subject: Re: svn commit: r298655 - head/sys/kgssapi From: Alan Somers To: "Conrad E. Meyer" Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2016 20:24:45 -0000 You really ought to. When you MFC yourself, it reduces the likelihood of errors, because you understand the change best. When someone else does it, it's more likely he'll make a mistake, because he may not know the fine details behind the change. In fact, it's hard for anybody else to even know that a given change should or shouldn't be MFCed. The MFC reminder emails only go to the committer, not to everyone. And when someone unfamiliar with kgssapi looks at a commit message like the one below, he doesn't know whether there's no MFC tag because the change isn't applicable to stable/10, or because the committer forgot it, or because the committer just "doesn't do stable". Please help maintain stable/10. It's everyone's job. -Alan On Tue, Apr 26, 2016 at 1:23 PM, Conrad Meyer wrote: > Nope! I don't do stable/. > > On Tue, Apr 26, 2016 at 12:06 PM, Alan Somers wrote: > >> Nice catch. Will you be MFCing this to stable/10? >> >> On Tue, Apr 26, 2016 at 12:11 PM, Conrad E. Meyer >> wrote: >> >>> Author: cem >>> Date: Tue Apr 26 18:11:45 2016 >>> New Revision: 298655 >>> URL: https://svnweb.freebsd.org/changeset/base/298655 >>> >>> Log: >>> kgssapi: Don't leak memory in error cases >>> >>> Reported by: Coverity >>> CIDs: 1007046, 1007047, 1007048 >>> Sponsored by: EMC / Isilon Storage Division >>> >>> Modified: >>> head/sys/kgssapi/gssd_prot.c >>> >>> Modified: head/sys/kgssapi/gssd_prot.c >>> >>> ============================================================================== >>> --- head/sys/kgssapi/gssd_prot.c Tue Apr 26 18:08:51 2016 >>> (r298654) >>> +++ head/sys/kgssapi/gssd_prot.c Tue Apr 26 18:11:45 2016 >>> (r298655) >>> @@ -101,8 +101,10 @@ xdr_gss_OID(XDR *xdrs, gss_OID *oidp) >>> } else { >>> oid = mem_alloc(sizeof(gss_OID_desc)); >>> memset(oid, 0, sizeof(*oid)); >>> - if (!xdr_gss_OID_desc(xdrs, oid)) >>> + if (!xdr_gss_OID_desc(xdrs, oid)) { >>> + mem_free(oid, sizeof(gss_OID_desc)); >>> return (FALSE); >>> + } >>> *oidp = oid; >>> } >>> break; >>> @@ -164,8 +166,10 @@ xdr_gss_OID_set(XDR *xdrs, gss_OID_set * >>> } else { >>> set = mem_alloc(sizeof(gss_OID_set_desc)); >>> memset(set, 0, sizeof(*set)); >>> - if (!xdr_gss_OID_set_desc(xdrs, set)) >>> + if (!xdr_gss_OID_set_desc(xdrs, set)) { >>> + mem_free(set, sizeof(gss_OID_set_desc)); >>> return (FALSE); >>> + } >>> *setp = set; >>> } >>> break; >>> @@ -224,8 +228,10 @@ xdr_gss_channel_bindings_t(XDR *xdrs, gs >>> || !xdr_gss_buffer_desc(xdrs, >>> &ch->acceptor_address) >>> || !xdr_gss_buffer_desc(xdrs, >>> - &ch->application_data)) >>> + &ch->application_data)) { >>> + mem_free(ch, sizeof(*ch)); >>> return (FALSE); >>> + } >>> *chp = ch; >>> } >>> break; >>> >>> >> >