diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7ff846f6f6b347e194786ed978a8180accd8b871..0d3b0bd7f3e6e006dee7ade2fab49f28b8e5a521 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -9919,7 +9919,7 @@ qemuDomainSnapshotCreateSingleDiskActive(struct qemud_driver *driver, /* create the actual snapshot */ ret = qemuMonitorDiskSnapshot(priv->mon, actions, device, source, - driverType, reuse); + snap->driverType, reuse); virDomainAuditDisk(vm, disk->src, source, "snapshot", ret >= 0); if (ret < 0) goto cleanup; diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index eeeb6a603bcb5dd821d469b1ddca1537d0e3f1eb..8c028b9bc079ae168d16e2d8ab544e273c14bfad 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -417,6 +417,12 @@ qemuMonitorJSONMakeCommandRaw(bool wrap, const char *cmdname, ...) switch (type) { case 's': { char *val = va_arg(args, char *); + if (!val) { + qemuReportError(VIR_ERR_INTERNAL_ERROR, + _("argument key '%s' must not have null value"), + key); + goto error; + } ret = virJSONValueObjectAppendString(jargs, key, val); } break; case 'i': {