1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-23 21:34:54 +03:00

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
This commit is contained in:
John Ferlan 2016-10-10 06:24:06 -04:00
parent 4ac20b3ae4
commit c951cdbff9

View File

@ -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,
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);