mirror of https://github.com/xemu-project/xemu.git
hw/xen: Fix broken check for invalid state in xs_be_open()
Coverity points out that if (!s && !s->impl) isn't really what we intended
to do here. CID 1508131.
Fixes: 0324751272
("hw/xen: Add emulated implementation of XenStore operations")
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20230412185102.441523-6-dwmw2@infradead.org>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
This commit is contained in:
parent
2f20b1732d
commit
c9bdfe8d58
|
@ -1688,7 +1688,7 @@ static struct qemu_xs_handle *xs_be_open(void)
|
|||
XenXenstoreState *s = xen_xenstore_singleton;
|
||||
struct qemu_xs_handle *h;
|
||||
|
||||
if (!s && !s->impl) {
|
||||
if (!s || !s->impl) {
|
||||
errno = -ENOSYS;
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue