Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107065725
D29019.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
744 B
Referenced Files
None
Subscribers
None
D29019.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D29019: kvm_nlist(3) leaks allocated memory
Attached
Detach File
Event Timeline
Log In to Comment