Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Mar 2017 02:47:28 +0000 (UTC)
From:      Ngie Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r315603 - head/lib/libkvm
Message-ID:  <201703200247.v2K2lSrb069974@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703200247.v2K2lSrb069974>