On Tue, Feb 19, 2019 at 09:21:10AM -0600, Eric Blake wrote:
 Missing an unlink().  Also, does the caller properly use
close(disk->fd)
 on early exits like this, or does it not matter because we're just going
 to exit()? 
Just about the early exits: I started off trying to get those paths
right but it made the code ridiculously complicated so I gave up.  As
you say config_complete just calls exit, so it's not really a problem,
in fact more likely to cause bugs than fix them.
Rich.
-- 
Richard Jones, Virtualization Group, Red Hat 
http://people.redhat.com/~rjones
Read my programming and virtualization blog: 
http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/