Fix minor errors found by coverity. Thanks Gleb for
the pointers to the email!
This commit is contained in:
parent
9f02b3ec86
commit
8a3bbeb234
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=277485
@ -1808,6 +1808,9 @@ process_file(char *filename)
|
|||||||
if (cnts == NULL) {
|
if (cnts == NULL) {
|
||||||
/* Nothing we can do */
|
/* Nothing we can do */
|
||||||
printf("Nothing to do -- no counters built\n");
|
printf("Nothing to do -- no counters built\n");
|
||||||
|
if (io) {
|
||||||
|
fclose(io);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
lace_cpus_together();
|
lace_cpus_together();
|
||||||
@ -2044,7 +2047,7 @@ get_cpuid_set(void)
|
|||||||
printf("No memory3 allocation fails at startup?\n");
|
printf("No memory3 allocation fails at startup?\n");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
memset(more, sz, 0);
|
memset(more, 0, sz);
|
||||||
memcpy(more, valid_pmcs, sz);
|
memcpy(more, valid_pmcs, sz);
|
||||||
pmc_allocated_cnt *= 2;
|
pmc_allocated_cnt *= 2;
|
||||||
free(valid_pmcs);
|
free(valid_pmcs);
|
||||||
|
Loading…
Reference in New Issue
Block a user