From owner-svn-src-all@freebsd.org Fri May 25 20:11:33 2018 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 63205EF3126; Fri, 25 May 2018 20:11:33 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::22d]) (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 CA7307223E; Fri, 25 May 2018 20:11:32 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wm0-x22d.google.com with SMTP id l1-v6so17529107wmb.2; Fri, 25 May 2018 13:11:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=ChWTbw2q/E0g3jnJYfiF/CRnt4MKZQQ2DPdDxR/rrqI=; b=XoWbFhI5V4526nx6qFyktQNtgesEwTXdDbRQcUnTLfiQyxGztYjnsAlMXWF4M7hzdQ brUde8c01Y6U3QUIcZu4FrT4vYf+iUTkRu6A3xFTsGpIGMmQysPvlSvvQU4j0rS/JOWN 1mKkW6yU59KqMEHF0YHUasQN5hKLX9o6tJtpNVLqRy1SWRSWX8l6v6G3bypuDv/R5v7w yCu37S+w5Gd0WxtjjwenYUiiUg+VQzvysQPkMqYiKICkmNGCnuIklA1ecO9dTCNZQ378 XLUeIe6FE+hi6ASUrRLrpxW+WaP+xXbarltM4AnRmQs8ZhQOrlQDjzLpwNxQ4O7YVXpp 4TQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=ChWTbw2q/E0g3jnJYfiF/CRnt4MKZQQ2DPdDxR/rrqI=; b=H2YiFXbpH+oSW5RZ4rWOgPi/rSgYHq1o1JcRLSjs82mkrcM5B3OMGNp8FRGYJZdx+Q TeqasjBSVaUCJ6c5suXl/Y0Jmc4H7c8e6GVA8ZEUn0IFYpoZHOvDmZI3jp31Gm5uzBCK kWuFc0BGH7H27yHzcseRHFEXFOUWYQvLhCyx1sr9Z1UpVtnqf6LaZqAAffn9l9iLAIHS Zar/fsfC4zftyYY80jEVHnKO9stRShbw1JHN9iwu1xv0OW9CzgSG/GKVjY/UXkO3UOSV eb5S76Amxk4083KMR1u/kIpuzgpcf/UV8P40alymLget/jOZrCv1obPMG6THqmZJ6yRE V0KA== X-Gm-Message-State: ALKqPwcWSKPgOa3TQrH7Uw08I0ZyeQzFkwoEypv4QZWLA0YrNFobXjxD p4QYhEG2tlzEeDnc3hOK3KLrYA== X-Google-Smtp-Source: ADUXVKLQzWLx16mi3Pkphxi+oRJ2VhaH5bJE2luSfn4My1QlaVhwMG3mgjkT7r9OJaFpPSo6pWYcug== X-Received: by 2002:a1c:96c1:: with SMTP id y184-v6mr2713486wmd.156.1527279090559; Fri, 25 May 2018 13:11:30 -0700 (PDT) Received: from brick (cpc92302-cmbg19-2-0-cust461.5-4.cable.virginm.net. [82.1.209.206]) by smtp.gmail.com with ESMTPSA id k16-v6sm8651724wrh.25.2018.05.25.13.11.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 May 2018 13:11:29 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Fri, 25 May 2018 21:11:28 +0100 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: araujo@freebsd.org Cc: Brooks Davis , Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r334199 - head/usr.sbin/bhyve Message-ID: <20180525201128.GA97785@brick> Mail-Followup-To: araujo@freebsd.org, Brooks Davis , Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201805250207.w4P275Pf060725@repo.freebsd.org> <20180525151134.GB99063@spindle.one-eyed-alien.net> <20180525174424.GD99063@spindle.one-eyed-alien.net> <20180525182139.GE99063@spindle.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 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: Fri, 25 May 2018 20:11:33 -0000 On 0526T0226, Marcelo Araujo wrote: > 2018-05-26 2:21 GMT+08:00 Brooks Davis : [..] > > The correct code here would be one of: > > > > str = strdup(opt); > > if (str == NULL) > > goto out; > > > > No, it is not the correct code! If we go out and free(str) we have nothing > to free, because we even didn't allocated memory for str. FWIW, calling free(3) on a NULL pointer is perfectly fine.