Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jan 2018 11:36:14 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r327542 - stable/11/usr.sbin/cpucontrol
Message-ID:  <201801041136.w04BaE9i033394@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Thu Jan  4 11:36:13 2018
New Revision: 327542
URL: https://svnweb.freebsd.org/changeset/base/327542

Log:
  MFC r327264i (by imp), r327283:
  Fix returns without cleanups.

Modified:
  stable/11/usr.sbin/cpucontrol/intel.c
  stable/11/usr.sbin/cpucontrol/via.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.sbin/cpucontrol/intel.c
==============================================================================
--- stable/11/usr.sbin/cpucontrol/intel.c	Thu Jan  4 08:23:23 2018	(r327541)
+++ stable/11/usr.sbin/cpucontrol/intel.c	Thu Jan  4 11:36:13 2018	(r327542)
@@ -145,7 +145,7 @@ intel_update(const char *dev, const char *path)
 	fd = open(path, O_RDONLY, 0);
 	if (fd < 0) {
 		WARN(0, "open(%s)", path);
-		return;
+		goto fail;
 	}
 	error = fstat(fd, &st);
 	if (error != 0) {
@@ -259,7 +259,7 @@ matched:
 	if (revision >= fw_header->revision) {
 		WARNX(1, "skipping %s of rev %#x: up to date",
 		    path, fw_header->revision);
-		return;
+		goto fail;
 	}
 	fprintf(stderr, "%s: updating cpu %s from rev %#x to rev %#x... ",
 			path, dev, revision, fw_header->revision);

Modified: stable/11/usr.sbin/cpucontrol/via.c
==============================================================================
--- stable/11/usr.sbin/cpucontrol/via.c	Thu Jan  4 08:23:23 2018	(r327541)
+++ stable/11/usr.sbin/cpucontrol/via.c	Thu Jan  4 11:36:13 2018	(r327542)
@@ -138,7 +138,7 @@ via_update(const char *dev, const char *path)
 	fd = open(path, O_RDONLY, 0);
 	if (fd < 0) {
 		WARN(0, "open(%s)", path);
-		return;
+		goto fail;
 	}
 	error = fstat(fd, &st);
 	if (error != 0) {



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