[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Xen-devel] Re: [PATCH v2] xen_console: support the new
From: |
Stefano Stabellini |
Subject: |
Re: [Qemu-devel] [Xen-devel] Re: [PATCH v2] xen_console: support the new extended xenstore protocol |
Date: |
Tue, 28 Jun 2011 16:15:42 +0100 |
User-agent: |
Alpine 2.00 (DEB 1167 2008-08-23) |
On Tue, 28 Jun 2011, Ian Campbell wrote:
> On Tue, 2011-06-28 at 16:02 +0100, Peter Maydell wrote:
> > On 28 June 2011 15:55, <address@hidden> wrote:
> > > + xs = xs_daemon_open();
> > > + if (xs == NULL) {
> > > + fprintf(stderr, "Could not contact XenStore\n");
> > > + goto out;
> > > + }
> >
> > > +out:
> > > + free(path);
> > > + xs_daemon_close(xs);
> >
> > Google suggests xs_daemon_close(NULL) will crash...
>
> Also the preferred interface these days is just xs_open/close. The other
> variants are deprecated.
And xs_close doesn't crash if the parameter is NULL, so it will kill two
birds with one stone.