lmkd: fix an overallocation am: a5845e7b60
am: 7b28974872
Change-Id: Ic0fab4e8d6aaa68fa82f926c6bbc7aed5656810e
This commit is contained in:
commit
66e5e052f4
|
|
@ -351,7 +351,7 @@ bool init_poll_kernel(struct kernel_poll_info *poll_info) {
|
||||||
|
|
||||||
static void proc_insert(struct proc* procp) {
|
static void proc_insert(struct proc* procp) {
|
||||||
if (!pidhash) {
|
if (!pidhash) {
|
||||||
pidhash = calloc(PIDHASH_SZ, sizeof(struct proc));
|
pidhash = calloc(PIDHASH_SZ, sizeof(*pidhash));
|
||||||
}
|
}
|
||||||
|
|
||||||
int hval = pid_hashfn(procp->pid);
|
int hval = pid_hashfn(procp->pid);
|
||||||
|
|
@ -426,7 +426,7 @@ void stats_purge_tasknames() {
|
||||||
procp = next;
|
procp = next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
memset(pidhash, 0, PIDHASH_SZ * sizeof(struct proc));
|
memset(pidhash, 0, PIDHASH_SZ * sizeof(*pidhash));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* LMKD_LOG_STATS */
|
#endif /* LMKD_LOG_STATS */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue