kvm_openfiles() uses the supplied buffer for storing error messages
in future calls, so we can't free it here. The right place to free the buffer would be to be after kvm_close(), but we don't do that yet. A static buffer would work too. Reviewed by: marcel (who has other plans for this anyway) Approved by: re
This commit is contained in:
@@ -409,7 +409,6 @@ main(int argc, char *argv[])
|
|||||||
kvm = kvm_openfiles(kernel, vmcore, NULL, O_RDONLY, s);
|
kvm = kvm_openfiles(kernel, vmcore, NULL, O_RDONLY, s);
|
||||||
if (kvm == NULL)
|
if (kvm == NULL)
|
||||||
errx(1, s);
|
errx(1, s);
|
||||||
free(s);
|
|
||||||
kgdb_thr_init();
|
kgdb_thr_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user