mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-26 18:41:17 +00:00
Don't use first byte of string as a pointer.
* src/qemu_conf.c (qemudReportError): Use the pointer, errorMessage, not its first byte, errorMessage[0].
This commit is contained in:
parent
f9e94c2e13
commit
4090a0870c
@ -1,5 +1,9 @@
|
|||||||
Mon Mar 3 19:09:51 CET 2008 Jim Meyering <meyering@redhat.com>
|
Mon Mar 3 19:09:51 CET 2008 Jim Meyering <meyering@redhat.com>
|
||||||
|
|
||||||
|
Don't use first byte of string as a pointer.
|
||||||
|
* src/qemu_conf.c (qemudReportError): Use the pointer, errorMessage,
|
||||||
|
not its first byte, errorMessage[0].
|
||||||
|
|
||||||
Avoid segfault upon early libvirtd failure.
|
Avoid segfault upon early libvirtd failure.
|
||||||
* qemud/qemud.c (main): Don't call qemudCleanup on an
|
* qemud/qemud.c (main): Don't call qemudCleanup on an
|
||||||
uninitialized pointer.
|
uninitialized pointer.
|
||||||
|
@ -68,7 +68,7 @@ void qemudReportError(virConnectPtr conn,
|
|||||||
errorMessage[0] = '\0';
|
errorMessage[0] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
virerr = __virErrorMsg(code, (errorMessage[0] ? errorMessage[0] : NULL));
|
virerr = __virErrorMsg(code, (errorMessage[0] ? errorMessage : NULL));
|
||||||
__virRaiseError(conn, dom, net, VIR_FROM_QEMU, code, VIR_ERR_ERROR,
|
__virRaiseError(conn, dom, net, VIR_FROM_QEMU, code, VIR_ERR_ERROR,
|
||||||
virerr, errorMessage, NULL, -1, -1, virerr, errorMessage);
|
virerr, errorMessage, NULL, -1, -1, virerr, errorMessage);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user