Avoid wild securityManager pointer in tests

For some reason we are not setting the driver with memset() to zeros.
But since commit 74abc3deac
driver->securityManager is being accessed and qemuagenttest started
crashing due to that.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Martin Kletzander 2016-01-09 18:28:53 +01:00
parent 8d48ce02c3
commit aea47e48c4

View File

@ -558,6 +558,8 @@ int qemuTestDriverInit(virQEMUDriver *driver)
if (virMutexInit(&driver->lock) < 0) if (virMutexInit(&driver->lock) < 0)
return -1; return -1;
driver->securityManager = NULL;
driver->config = virQEMUDriverConfigNew(false); driver->config = virQEMUDriverConfigNew(false);
if (!driver->config) if (!driver->config)
goto error; goto error;