From owner-svn-src-head@freebsd.org Fri Jun 23 23:11:49 2017 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 38BF7D8C393 for ; Fri, 23 Jun 2017 23:11:49 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail-ua0-x22c.google.com (mail-ua0-x22c.google.com [IPv6:2607:f8b0:400c:c08::22c]) (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 011F478307 for ; Fri, 23 Jun 2017 23:11:48 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: by mail-ua0-x22c.google.com with SMTP id g40so44714974uaa.3 for ; Fri, 23 Jun 2017 16:11:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sippysoft-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=NxPm0FzH0VRBgtnN9pnbckEQ2Q8MNF72UctT8dow6xc=; b=eKN58b69FWKOkVyg6IiLGuPH04i3FUSelPA7lk90/IMM3v3CTZR0E/HOS4oOsUhBAa STFqXdlYURqzLFZAGN5IZYCf5BKFu9j1cidZixUapiHSENmGmh8y26NJwHJrvGUvu90G hidho8iiaTVPl4lLLtCtddQoAbLYzRD/8+nUiuoVSXbAO7RbfgNLsXo1umV1kWGkC5gO PWnHhyHG85lk9mOiS8Z/EtyJCJv2XD6gJMjJUyDswOmyw4cn0VG6Zc383hf6uim3N2Ga +yyw1IYeFQiSVOflwGeU2xYcBEMCQWl8i01nEEdkRia82ptL3d4mEUkDaOkXEjsVpWco iFJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=NxPm0FzH0VRBgtnN9pnbckEQ2Q8MNF72UctT8dow6xc=; b=G550n/chks2MjhNLvR4yFeGUxtVErJTadZVykQumrnisQ/UONfZIidKkGusTmaF/qZ sbTaad0kS2H6VYeCE9ghwh5QcaIWZ0qyuFw9B7d4qV3OLUz7siIDdp/eaOC8/5p5jS1h vORsgzn+E58uTYaHxkxmamnltyXEMGAExBAfJDKI+Ze7/mTQ40liWfXHR0ZF2oq7uuPq Gcv+EV+JMsfIQZ2Pi0kuvPtbbwwGE7U9bLLanCFnGUwW3KDfM+9FMn7RQzWaxo7WWUiB 8mAHZTkVdQNP3zmzgm3w4mhqpLPX6ze9E3V8L9HeIS+Pp0LorVqe64CTZgVgQkTUSzS6 5v9w== X-Gm-Message-State: AKS2vOzTHrfAOSGSwkdqf6gDZarnFl54sEIHY2q6izg3BU2rHC8bfNqX /FIoFMREUGW09uxDa32/qdNvOLD640Gr X-Received: by 10.176.24.233 with SMTP id d41mr1479432uah.23.1498259508047; Fri, 23 Jun 2017 16:11:48 -0700 (PDT) MIME-Version: 1.0 Sender: sobomax@sippysoft.com Received: by 10.176.16.76 with HTTP; Fri, 23 Jun 2017 16:11:47 -0700 (PDT) In-Reply-To: References: <201706231739.v5NHd05x039900@repo.freebsd.org> From: Maxim Sobolev Date: Fri, 23 Jun 2017 16:11:47 -0700 X-Google-Sender-Auth: Lgg7G_R03xTVB0K_iGryPwZ89Cg Message-ID: Subject: Re: svn commit: r320277 - head/usr.bin/mkuzip To: "Conrad E. Meyer" Cc: src-committers , 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.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 23 Jun 2017 23:11:49 -0000 Yeah, silly me. Thanks^2. -Max On Fri, Jun 23, 2017 at 3:54 PM, Conrad Meyer wrote: > One more nit. > > On Fri, Jun 23, 2017 at 10:39 AM, Maxim Sobolev > wrote: > > Author: sobomax > > Date: Fri Jun 23 17:39:00 2017 > > New Revision: 320277 > > URL: https://svnweb.freebsd.org/changeset/base/320277 > > > > Log: > > Don't leak file descriptor in some cases. > > > > Reported by: cem > > MFC after: 6 weeks > > > > Modified: > > head/usr.bin/mkuzip/mkuz_insize.c > > > > Modified: head/usr.bin/mkuzip/mkuz_insize.c > > ============================================================ > ================== > > --- head/usr.bin/mkuzip/mkuz_insize.c Fri Jun 23 17:31:07 2017 > (r320276) > > +++ head/usr.bin/mkuzip/mkuz_insize.c Fri Jun 23 17:39:00 2017 > (r320277) > > @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); > > #include > > #include > > #include > > +#include > > > > #include "mkuz_cfg.h" > > #include "mkuz_insize.h" > > @@ -58,12 +59,15 @@ mkuz_get_insize(struct mkuz_cfg *cfp) > > ffd = open(statfsbuf.f_mntfromname, O_RDONLY); > > if (ffd < 0) { > > warn("open(%s, O_RDONLY)", > statfsbuf.f_mntfromname); > > + close(ffd); > > This one is wrong for obvious reasons. > >