]> git.ipfire.org Git - thirdparty/libvirt.git/commit
snapshot: fix corner case on OOM during creation
authorEric Blake <eblake@redhat.com>
Thu, 1 Sep 2011 21:22:02 +0000 (15:22 -0600)
committerEric Blake <eblake@redhat.com>
Fri, 2 Sep 2011 14:50:01 +0000 (08:50 -0600)
commitc554f6e18be9ce73d5207721f06cc1ff8b0aac7d
tree6bb8269d6507f0c1e14144e265abed9c24c25903
parente86789a5f237e2ee4d1832331dea7ac93bc3c50f
snapshot: fix corner case on OOM during creation

Commit 6766ff10 introduced a corner case bug with snapshot creation:
if a snapshot is created, but then we hit OOM while trying to
create the return value of the function, then we have polluted the
internal directory with the snapshot metadata with no way to clean
it up from the running libvirtd.

* src/qemu/qemu_driver.c (qemuDomainSnapshotCreateXML): Don't
write metadata file on OOM condition.
src/qemu/qemu_driver.c