summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 627a050)
raw | patch | inline | side by side (parent: 627a050)
author | jazzmes <tcarvalho@cmu.edu> | |
Thu, 31 Jul 2014 17:08:54 +0000 (10:08 -0700) | ||
committer | jazzmes <tcarvalho@cmu.edu> | |
Thu, 31 Jul 2014 17:08:54 +0000 (10:08 -0700) |
Fixed memory leaks
src/libvirt.c | patch | blob | history |
diff --git a/src/libvirt.c b/src/libvirt.c
index 849cfe2264d3e739ebb420b9072601616fbdb11c..8eec9aafa8a2f722427425a30a10b928894d14e9 100644 (file)
--- a/src/libvirt.c
+++ b/src/libvirt.c
{
ERROR ("libvirt plugin: virDomainGetVcpus failed with status %i.",
status);
- free (vinfo);
+ sfree (vinfo);
continue;
}
vcpu_submit (vinfo[j].cpuTime,
domains[i], vinfo[j].number, "virt_vcpu");
+ sfree (vinfo);
minfo = malloc (VIR_DOMAIN_MEMORY_STAT_NR * sizeof (virDomainMemoryStatStruct));
if (minfo == NULL) {
if (status < 0) {
ERROR ("libvirt plugin: virDomainMemoryStats failed with status %i.",
status);
+ sfree (minfo);
continue;
}
}
sfree (minfo);
- sfree (vinfo);
}