Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177539181
D59364.1794664673.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
484 B
Referenced Files
None
Subscribers
None
D59364.1794664673.diff
View Options
diff --git a/usr.sbin/pmc/cmd_pmc_stat.c b/usr.sbin/pmc/cmd_pmc_stat.c
--- a/usr.sbin/pmc/cmd_pmc_stat.c
+++ b/usr.sbin/pmc/cmd_pmc_stat.c
@@ -204,7 +204,7 @@
pmc_args.pa_logfd = pmcstat_open_log(pmc_args.pa_outputpath,
PMCSTAT_OPEN_FOR_WRITE);
for (i = 0; i < STAT_MODE_NPMCS; i++) {
- if ((ev = malloc(sizeof(*ev))) == NULL)
+ if ((ev = calloc(1, sizeof(*ev))) == NULL)
errx(EX_SOFTWARE, "ERROR: Out of memory.");
if (system_mode)
ev->ev_mode = PMC_MODE_SC;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 14, 1:57 PM (27 m, 29 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38524688
Default Alt Text
D59364.1794664673.diff (484 B)
Attached To
Mode
D59364: pmc(8): zero-initialize the event descriptor in stat mode
Attached
Detach File
Event Timeline