* src/xend_internal.c: avoid a segfault when dumping XML with recent

xen versions, patch by Sascha, fixes #503254
daniel
This commit is contained in:
Daniel Veillard 2009-06-26 18:14:16 +00:00
parent fd90b67afe
commit 14435163a0
2 changed files with 14 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Fri Jun 26 20:11:38 CEST 2009 Daniel Veillard <veillard@redhat.com>
* src/xend_internal.c: avoid a segfault when dumping XML with recent
xen versions, patch by Sascha, fixes #503254
Fri Jun 26 18:15:08 CEST 2009 Daniel Veillard <veillard@redhat.com>
* src/libvirt_private.syms src/parthelper.c src/storage_backend_disk.c

View File

@ -2079,7 +2079,15 @@ xenDaemonParseSxprGraphicsNew(virConnectPtr conn,
if (sexpr_lookup(node, "device/vfb")) {
/* New style graphics config for PV guests in >= 3.0.4,
* or for HVM guests in >= 3.0.5 */
tmp = sexpr_node(node, "device/vfb/type");
if (sexpr_node(node, "device/vfb/type")) {
tmp = sexpr_node(node, "device/vfb/type");
} else if (sexpr_node(node, "device/vfb/vnc")) {
tmp = "vnc";
} else if (sexpr_node(node, "device/vfb/sdl")) {
tmp = "sdl";
} else {
tmp = "unknown";
}
if (VIR_ALLOC(graphics) < 0)
goto no_memory;