Coverity rightfully determined that in commit
3d021381c71221e563182f03
I made a mistake in the first check if @persDef is not NULL is
dereferencing it rather than checking.
Additionally if the vm is online the code would set @liveDef twice
rather than modifying @persDef. Fix both mistakes.
if (liveDef)
*liveDef = NULL;
- if (*persDef)
+ if (persDef)
*persDef = NULL;
if (virDomainObjUpdateModificationImpact(vm, &flags) < 0)
*liveDef = vm->def;
if (persDef)
- *liveDef = vm->newDef;
+ *persDef = vm->newDef;
} else {
if (persDef)
*persDef = vm->def;