In qemuDomainSaveMemory, wrapperFd might be NULL and should be checked before
calling virFileWrapperFdCatchError. Same in doCoreDump.
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=880919
cleanup:
VIR_FORCE_CLOSE(fd);
- virFileWrapperFdCatchError(wrapperFd);
+ if (wrapperFd)
+ virFileWrapperFdCatchError(wrapperFd);
virFileWrapperFdFree(wrapperFd);
VIR_FREE(xml);
cleanup:
VIR_FORCE_CLOSE(fd);
if (ret != 0) {
- virFileWrapperFdCatchError(wrapperFd);
+ if (wrapperFd)
+ virFileWrapperFdCatchError(wrapperFd);
unlink(path);
}
virFileWrapperFdFree(wrapperFd);