https://bugzilla.redhat.com/show_bug.cgi?id=1251886
We do not allow delete an iothread which id is 0 in
virDomainDelIOThread, but allow it in virDomainAddIOThread,
Also we will output an error when parse an iothread which id
is 0.
Add a check for iothread_id in virDomainAddIOThread to fix
it.
Signed-off-by: Luyao Huang <lhuang(a)redhat.com>
---
Is that okay to fix it in this place ?
src/libvirt-domain.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index 837933f..8506942 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -7987,6 +7987,7 @@ virDomainAddIOThread(virDomainPtr domain,
virCheckDomainReturn(domain, -1);
virCheckReadOnlyGoto(domain->conn->flags, error);
+ virCheckNonZeroArgGoto(iothread_id, error);
conn = domain->conn;
--
1.8.3.1