sintrcnt/sintrnames is the address of the size, not the actual size.
Use them appropriately to fetch the actual size. That fixes vmstat -i with kvm backend. Submitted by: peter Approved by: re (kib)
This commit is contained in:
parent
54257e2cbd
commit
8953ac4334
@ -1153,8 +1153,8 @@ dointr(void)
|
||||
|
||||
uptime = getuptime();
|
||||
if (kd != NULL) {
|
||||
intrcntlen = namelist[X_SINTRCNT].n_value;
|
||||
inamlen = namelist[X_SINTRNAMES].n_value;
|
||||
kread(X_SINTRCNT, &intrcntlen, sizeof(intrcntlen));
|
||||
kread(X_SINTRNAMES, &inamlen, sizeof(inamlen));
|
||||
if ((intrcnt = malloc(intrcntlen)) == NULL ||
|
||||
(intrname = malloc(inamlen)) == NULL)
|
||||
err(1, "malloc()");
|
||||
|
Loading…
Reference in New Issue
Block a user