提交 c951cdbf 编写于 作者: J John Ferlan

conf: Remove incorrect check when encoding shmem audit message

Remove the !size check since size is initialized to NULL and thus
causing the condition to always be true
上级 4ac20b3a
...@@ -983,7 +983,7 @@ virDomainAuditShmem(virDomainObjPtr vm, ...@@ -983,7 +983,7 @@ virDomainAuditShmem(virDomainObjPtr vm,
virUUIDFormat(vm->def->uuid, uuidstr); virUUIDFormat(vm->def->uuid, uuidstr);
if (!vmname || !src || !size || !shmem || if (!vmname || !src || !shmem ||
virAsprintfQuiet(&size, "%llu", def->size) < 0) { virAsprintfQuiet(&size, "%llu", def->size) < 0) {
VIR_WARN("OOM while encoding audit message"); VIR_WARN("OOM while encoding audit message");
goto cleanup; goto cleanup;
...@@ -997,7 +997,7 @@ virDomainAuditShmem(virDomainObjPtr vm, ...@@ -997,7 +997,7 @@ virDomainAuditShmem(virDomainObjPtr vm,
VIR_AUDIT(VIR_AUDIT_RECORD_RESOURCE, success, VIR_AUDIT(VIR_AUDIT_RECORD_RESOURCE, success,
"virt=%s resrc=shmem reason=%s %s uuid=%s size=%s %s %s", "virt=%s resrc=shmem reason=%s %s uuid=%s size=%s %s %s",
virt, reason, vmname, uuidstr, size ?: "?", shmem, src); virt, reason, vmname, uuidstr, size, shmem, src);
cleanup: cleanup:
VIR_FREE(vmname); VIR_FREE(vmname);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册