On 08/04/15 16:01, Wei Liu wrote: > Signed-off-by: Wei Liu <wei.l...@citrix.com> > Cc: Ian Campbell <ian.campb...@citrix.com> > Cc: Ian Jackson <ian.jack...@eu.citrix.com> > Cc: Charles Arnold <carn...@suse.com>
The xenstat handle passed around already has an open xc_handle. That should be reused rather than opening a new one every time we want to get a list of domain ids. ~Andrew > --- > tools/xenstat/libxenstat/src/xenstat_qmp.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tools/xenstat/libxenstat/src/xenstat_qmp.c > b/tools/xenstat/libxenstat/src/xenstat_qmp.c > index 2cb99e9..f3aeec4 100644 > --- a/tools/xenstat/libxenstat/src/xenstat_qmp.c > +++ b/tools/xenstat/libxenstat/src/xenstat_qmp.c > @@ -366,6 +366,8 @@ static xc_domaininfo_t *get_domain_ids(int *num_doms) > if (dominfo == NULL) > return NULL; > xc_handle = xc_interface_open(0,0,0); > + if (xc_handle == NULL) > + return NULL; > *num_doms = xc_domain_getinfolist(xc_handle, 0, 1024, dominfo); > xc_interface_close(xc_handle); > return dominfo; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel