]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuTestDriverInit: init the driver lock too
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 22 Sep 2015 14:12:39 +0000 (16:12 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 22 Sep 2015 15:05:16 +0000 (17:05 +0200)
commitb1dc59b39531cb92d0520fb1d2fc2c342b9747f9
tree15232d144f83e4024404ff5a8d9d622ac1249e50
parentec6754db57510173be372e3981ddb6a5cefbcce0
qemuTestDriverInit: init the driver lock too

Even though usage of the lock is limited to a very few cases,
it's still needed. Therefore we should initialize it too.
Otherwise we may get some random test failures:

==1204== Conditional jump or move depends on uninitialised value(s)
==1204==    at 0xEF7F7CF: pthread_mutex_lock (in /lib64/libpthread-2.20.so)
==1204==    by 0x9CA89A5: virMutexLock (virthread.c:89)
==1204==    by 0x450B2A: qemuDriverLock (qemu_conf.c:83)
==1204==    by 0x45549C: virQEMUDriverGetConfig (qemu_conf.c:869)
==1204==    by 0x448E29: qemuDomainDeviceDefPostParse (qemu_domain.c:1240)
==1204==    by 0x9CC9B13: virDomainDeviceDefPostParse (domain_conf.c:4224)
==1204==    by 0x9CC9B91: virDomainDefPostParseDeviceIterator (domain_conf.c:4251)
==1204==    by 0x9CC7843: virDomainDeviceInfoIterateInternal (domain_conf.c:3440)
==1204==    by 0x9CC9C25: virDomainDefPostParse (domain_conf.c:4276)
==1204==    by 0x9CEEE03: virDomainDefParseXML (domain_conf.c:16400)
==1204==    by 0x9CEF5B4: virDomainDefParseNode (domain_conf.c:16582)
==1204==    by 0x9CEF423: virDomainDefParse (domain_conf.c:16529)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
tests/testutilsqemu.c