]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Only assign newDef when we have a new def.
authorChris Lalancette <clalance@redhat.com>
Fri, 2 Apr 2010 14:41:47 +0000 (10:41 -0400)
committerChris Lalancette <clalance@redhat.com>
Mon, 5 Apr 2010 14:24:44 +0000 (10:24 -0400)
commit32c3c1f0b7f5257903cca0028f9723b9365ca0a7
tree26d2a019fa2f88d182e7f3672b84e1e1ae64957f
parent9b55a52b4fbc2d610c1316a4cdca8c0f71f4c838
Only assign newDef when we have a new def.

While playing around with def/newDef with the qemu code,
I noticed that newDef was *always* getting set to a value,
even when I didn't redefine the domain.  I think the problem
is the virDomainLoadConfig is always doing virDomainAssignDef
regardless of whether the domain already exists in the hashtable.
In turn, virDomainAssignDef is assigning the definition (which
is actually a duplicate) to newDef.  Fix this so that newDef stays
NULL until we actually have a new def.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
src/conf/domain_conf.c