diff options
author | Matthias Bolte <matthias.bolte@googlemail.com> | 2011-07-11 19:29:09 +0200 |
---|---|---|
committer | Matthias Bolte <matthias.bolte@googlemail.com> | 2011-07-11 19:38:51 +0200 |
commit | aa14709a4771924fdd880eecba46417c61736cc8 (patch) | |
tree | ede0da4df6775d634942ce48f84b9c6429b116c0 /tests/xmconfigtest.c | |
parent | remote: Fix memory leak (diff) | |
download | libvirt-aa14709a4771924fdd880eecba46417c61736cc8.tar.gz libvirt-aa14709a4771924fdd880eecba46417c61736cc8.tar.bz2 libvirt-aa14709a4771924fdd880eecba46417c61736cc8.zip |
Add domain type checking
The drivers were accepting domain configs without checking if those
were actually meant for them. For example the LXC driver happily
accepts configs with type QEMU.
Add a check for the expected domain types to the virDomainDefParse*
functions.
Diffstat (limited to 'tests/xmconfigtest.c')
-rw-r--r-- | tests/xmconfigtest.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/xmconfigtest.c b/tests/xmconfigtest.c index a15a7ff19..c184b8df0 100644 --- a/tests/xmconfigtest.c +++ b/tests/xmconfigtest.c @@ -68,7 +68,7 @@ testCompareParseXML(const char *xmcfg, const char *xml, int xendConfigVersion) priv.caps = caps; conn->privateData = &priv; - if (!(def = virDomainDefParseString(caps, xmlData, + if (!(def = virDomainDefParseString(caps, xmlData, 1 << VIR_DOMAIN_VIRT_XEN, VIR_DOMAIN_XML_INACTIVE))) goto fail; |