Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Jul 2015 19:09:12 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r285849 - stable/10/usr.sbin/pmcstudy
Message-ID:  <201507241909.t6OJ9Cs9069659@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Fri Jul 24 19:09:11 2015
New Revision: 285849
URL: https://svnweb.freebsd.org/changeset/base/285849

Log:
  MFC r277485 by rrs: Fix minor errors found by coverity.
  
  PR:		201594
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/usr.sbin/pmcstudy/pmcstudy.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/pmcstudy/pmcstudy.c
==============================================================================
--- stable/10/usr.sbin/pmcstudy/pmcstudy.c	Fri Jul 24 19:05:08 2015	(r285848)
+++ stable/10/usr.sbin/pmcstudy/pmcstudy.c	Fri Jul 24 19:09:11 2015	(r285849)
@@ -1808,6 +1808,9 @@ process_file(char *filename)
 	if (cnts == NULL) {
 		/* Nothing we can do */
 		printf("Nothing to do -- no counters built\n");
+		if (io) {
+			fclose(io);
+		}
 		return;
 	}
 	lace_cpus_together();
@@ -2044,7 +2047,7 @@ get_cpuid_set(void)
 				printf("No memory3 allocation fails at startup?\n");	
 				exit(-1);
 			}
-			memset(more, sz, 0);
+			memset(more, 0, sz);
 			memcpy(more, valid_pmcs, sz);
 			pmc_allocated_cnt *= 2;
 			free(valid_pmcs);



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