mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-03 17:47:15 +03:00
xend_internal.c: don't dereference NULL for unexpected input
* src/xen/xend_internal.c (xenDaemonDomainSetAutostart): Avoid a NULL dereference upon non-SEXPR_VALUE'd on_xend_start. This bug was introduced by commit 37ce5600c0bb1aed9e2f2888922388de4340ebd3.
This commit is contained in:
parent
6ef20bb7ae
commit
14ee6a66f8
@ -4411,7 +4411,7 @@ xenDaemonDomainSetAutostart(virDomainPtr domain,
|
||||
if (autonode) {
|
||||
const char *val = (autonode->u.s.car->kind == SEXPR_VALUE
|
||||
? autonode->u.s.car->u.value : NULL);
|
||||
if (!STREQ(val, "ignore") && !STREQ(val, "start")) {
|
||||
if (!val || (!STREQ(val, "ignore") && !STREQ(val, "start"))) {
|
||||
virXendError(domain->conn, VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("unexpected value from on_xend_start"));
|
||||
goto error;
|
||||
|
Loading…
x
Reference in New Issue
Block a user