Update of /cvsroot/sblim/gather/plugin
In directory vz-cvs-3.sog:/tmp/cvs-serv13895/plugin
Modified Files:
metricVirt.c metricVirt.h
Log Message:
Fixed 3419837: bad alloc and usigned returns in metricVirt
Index: metricVirt.c
===================================================================
RCS file: /cvsroot/sblim/gather/plugin/metricVirt.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- metricVirt.c 21 Sep 2011 21:38:38 -0000 1.13
+++ metricVirt.c 7 Oct 2011 00:08:52 -0000 1.14
@@ -296,7 +296,7 @@
/*
* get statistics from active domains
*/
- ids = malloc(sizeof(ids) * node_statistics.num_active_domains);
+ ids = malloc(sizeof(*ids) * node_statistics.num_active_domains);
if (ids == NULL) {
virConnectClose(conn);
return VIRT_FAIL;
Index: metricVirt.h
===================================================================
RCS file: /cvsroot/sblim/gather/plugin/metricVirt.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- metricVirt.h 12 May 2011 00:46:29 -0000 1.6
+++ metricVirt.h 7 Oct 2011 00:08:52 -0000 1.7
@@ -34,8 +34,8 @@
#define VIRT_FAIL -1
struct node_statistics_type {
- unsigned int num_active_domains;
- unsigned int num_inactive_domains;
+ int num_active_domains;
+ int num_inactive_domains;
unsigned int total_domains;
unsigned long long total_memory;
unsigned long long free_memory;
|