Mailinglist Archive: vhostmd (42 mails)

< Previous Next >
Re: [vhostmd] [PATCH 1/2] vm-dump-metrics: Fix segmentation fault if Xenstore does not exist.
  • From: Jim Fehlig <jfehlig@xxxxxxxxxx>
  • Date: Fri, 16 Oct 2009 09:56:50 -0600
  • Message-id: <4AD897C2.6000504@xxxxxxxxxx>
Richard W.M. Jones wrote:
libmetrics/libmetrics.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/libmetrics/libmetrics.c b/libmetrics/libmetrics.c
index 9b3f9fa..8aaabcb 100644
--- a/libmetrics/libmetrics.c
+++ b/libmetrics/libmetrics.c
@@ -466,6 +466,10 @@ static int get_dom_id()
unsigned int len;

xsh = xs_domain_open();
+ if (xsh == NULL) {
+ libmsg("xs_domain_open: cannot open xenstore\n");
+ return -1;
+ }
domid = xs_read(xsh, XBT_NULL, "domid", &len);
if (domid) {
domID = atoi(domid);
-- 1.6.5.rc2

Yep, obvious bug. ACK

Jim

--
To unsubscribe, e-mail: vhostmd+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: vhostmd+help@xxxxxxxxxxxx

< Previous Next >
List Navigation