diff options
author | Daniel Kiper <daniel.kiper@oracle.com> | 2013-12-02 20:06:24 +0100 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2013-12-03 13:13:00 +0900 |
commit | 674fe5c63336d1bf56fcdfb7b7071290b07475cf (patch) | |
tree | 9effec0368625693178001b01ae8c4e2fe8960fc | |
parent | d01680c28ba7bf1e02f74aa5841247a45738f5d4 (diff) |
kexec-tools/xen: Do not call xc_interface_close() if xc_interface_open() failed
Do not call xc_interface_close() if xc_interface_open() failed.
xc_interface_close() crashes if it gets NULL as an argument.
Relevant fix for libxenctrl will be posted too but kexec-tools
should also behave properly.
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | kexec/arch/i386/crashdump-x86.c | 2 | ||||
-rw-r--r-- | kexec/arch/i386/kexec-x86-common.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c index 85f3a87..a3eb5ae 100644 --- a/kexec/arch/i386/crashdump-x86.c +++ b/kexec/arch/i386/crashdump-x86.c @@ -305,7 +305,7 @@ static int get_crash_memory_ranges_xen(struct memory_range **range, if (!xc) { fprintf(stderr, "%s: Failed to open Xen control interface\n", __func__); - goto err; + return -1; } rc = xc_get_machine_memory_map(xc, e820entries, CRASH_MAX_MEMORY_RANGES); diff --git a/kexec/arch/i386/kexec-x86-common.c b/kexec/arch/i386/kexec-x86-common.c index bf58f53..f55e2c2 100644 --- a/kexec/arch/i386/kexec-x86-common.c +++ b/kexec/arch/i386/kexec-x86-common.c @@ -176,7 +176,7 @@ static int get_memory_ranges_xen(struct memory_range **range, int *ranges) if (!xc) { fprintf(stderr, "%s: Failed to open Xen control interface\n", __func__); - goto err; + return -1; } rc = xc_get_machine_memory_map(xc, e820entries, MAX_MEMORY_RANGES); |