svn commit: r327542 - stable/11/usr.sbin/cpucontrol

Konstantin Belousov kib at FreeBSD.org
Thu Jan 4 11:36:15 UTC 2018


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) {


More information about the svn-src-all mailing list