Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171209734
D59364.id185761.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
484 B
Referenced Files
None
Subscribers
None
D59364.id185761.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
Thu, Sep 10, 1:20 PM (18 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38524688
Default Alt Text
D59364.id185761.diff (484 B)
Attached To
Mode
D59364: pmc(8): zero-initialize the event descriptor in stat mode
Attached
Detach File
Event Timeline
Log In to Comment