Complete r250105. Do not zero fields if M_ZERO flag is specified to

malloc(9).

Reported by:	pluknet, glebius
This commit is contained in:
Davide Italiano 2013-09-01 21:44:43 +00:00
parent 72d9611d24
commit 89f6b7baf4

View File

@ -2026,11 +2026,7 @@ pmc_allocate_owner_descriptor(struct proc *p)
/* allocate space for N pointers and one descriptor struct */
po = malloc(sizeof(struct pmc_owner), M_PMC, M_WAITOK|M_ZERO);
po->po_sscount = po->po_error = po->po_flags = po->po_logprocmaps = 0;
po->po_file = NULL;
po->po_owner = p;
po->po_kthread = NULL;
LIST_INIT(&po->po_pmcs);
LIST_INSERT_HEAD(poh, po, po_next); /* insert into hash table */
TAILQ_INIT(&po->po_logbuffers);
@ -2156,8 +2152,6 @@ pmc_allocate_pmc_descriptor(void)
struct pmc *pmc;
pmc = malloc(sizeof(struct pmc), M_PMC, M_WAITOK|M_ZERO);
pmc->pm_owner = NULL;
LIST_INIT(&pmc->pm_targets);
PMCDBG(PMC,ALL,1, "allocate-pmc -> pmc=%p", pmc);