On Thu, Jun 20, 2019 at 05:11:57PM +0200, Ilias Stamatis wrote:
The current implementation has the following bugs:
- the vm variable is accessed after calling virDomainObjEndAPI on it
- if VIR_STRDUP fails and we jump to the cleanup section, we're calling
VIR_FREE on pointers for which we haven't allocated memory
- the error type VIR_DOMAIN_DISK_ERROR_NONE is used which contradicts
the documentation of the API that says that disks with no errors are not
reported
This patch fixes all of them and additionally reports errors only for
every second disk (instead of reporting errors for all disks) which was
the initial intention.
I believe each patch should focus ideally on 1 thing only. So this patch should
IMO be split into 3 (doesn't matter in what order), each fixing a different bug.
Erik