From owner-svn-src-head@freebsd.org Mon Mar 20 02:47:29 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 65337D1428A; Mon, 20 Mar 2017 02:47:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 326FF157D; Mon, 20 Mar 2017 02:47:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2K2lSll069975; Mon, 20 Mar 2017 02:47:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2K2lSrb069974; Mon, 20 Mar 2017 02:47:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703200247.v2K2lSrb069974@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 20 Mar 2017 02:47:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315603 - head/lib/libkvm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Mon, 20 Mar 2017 02:47:29 -0000 Author: ngie Date: Mon Mar 20 02:47:28 2017 New Revision: 315603 URL: https://svnweb.freebsd.org/changeset/base/315603 Log: kvm_close(3): return `error` instead of blindly returning `0` `error` is the accumulated error from previous close(2) calls. This bug has been present since the libcall's import from 4.4BSD Lite (r1573). MFC after: 1 week Noticed by: vangyzen (D10022) Relnotes: yes Sponsored by: Dell EMC Isilon Modified: head/lib/libkvm/kvm.c Modified: head/lib/libkvm/kvm.c ============================================================================== --- head/lib/libkvm/kvm.c Mon Mar 20 01:53:50 2017 (r315602) +++ head/lib/libkvm/kvm.c Mon Mar 20 02:47:28 2017 (r315603) @@ -292,7 +292,7 @@ kvm_close(kvm_t *kd) free(kd->pt_map); free((void *)kd); - return (0); + return (error); } int