Page MenuHomeFreeBSD

D29019.diff
No OneTemporary

D29019.diff

diff --git a/lib/libkvm/kvm.c b/lib/libkvm/kvm.c
--- a/lib/libkvm/kvm.c
+++ b/lib/libkvm/kvm.c
@@ -301,6 +301,8 @@
free(kd->pt_map);
if (kd->page_map != NULL)
free(kd->page_map);
+ if (kd->dpcpu_initialized != 0)
+ free(kd->dpcpu_off);
if (kd->sparse_map != MAP_FAILED)
munmap(kd->sparse_map, kd->pt_sparse_size);
free((void *)kd);
@@ -340,6 +342,10 @@
if (count == 0)
return (0);
kl = calloc(count + 1, sizeof(*kl));
+ if (kl == NULL) {
+ _kvm_err(kd, kd->program, "cannot allocate memory");
+ return (-1);
+ }
for (i = 0; i < count; i++)
kl[i].n_name = nl[i].n_name;
nfail = kvm_nlist2(kd, kl);
@@ -349,6 +355,7 @@
nl[i].n_desc = 0;
nl[i].n_value = kl[i].n_value;
}
+ free(kl);
return (nfail);
}

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 10, 1:58 PM (14 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15742372
Default Alt Text
D29019.diff (744 B)

Event Timeline