提交 dd428d47 编写于 作者: M Marc-André Lureau 提交者: Eric Blake

conf: add missing break in virDomainAuditRedirdev

Also initialize to NULL a few variables that might get
free before being set.
上级 247726bf
...@@ -246,8 +246,8 @@ virDomainAuditHostdev(virDomainObjPtr vm, virDomainHostdevDefPtr hostdev, ...@@ -246,8 +246,8 @@ virDomainAuditHostdev(virDomainObjPtr vm, virDomainHostdevDefPtr hostdev,
{ {
char uuidstr[VIR_UUID_STRING_BUFLEN]; char uuidstr[VIR_UUID_STRING_BUFLEN];
char *vmname; char *vmname;
char *address; char *address = NULL;
char *device; char *device = NULL;
const char *virt; const char *virt;
virUUIDFormat(vm->def->uuid, uuidstr); virUUIDFormat(vm->def->uuid, uuidstr);
...@@ -319,8 +319,8 @@ virDomainAuditRedirdev(virDomainObjPtr vm, virDomainRedirdevDefPtr redirdev, ...@@ -319,8 +319,8 @@ virDomainAuditRedirdev(virDomainObjPtr vm, virDomainRedirdevDefPtr redirdev,
{ {
char uuidstr[VIR_UUID_STRING_BUFLEN]; char uuidstr[VIR_UUID_STRING_BUFLEN];
char *vmname; char *vmname;
char *address; char *address = NULL;
char *device; char *device = NULL;
const char *virt; const char *virt;
virUUIDFormat(vm->def->uuid, uuidstr); virUUIDFormat(vm->def->uuid, uuidstr);
...@@ -340,6 +340,7 @@ virDomainAuditRedirdev(virDomainObjPtr vm, virDomainRedirdevDefPtr redirdev, ...@@ -340,6 +340,7 @@ virDomainAuditRedirdev(virDomainObjPtr vm, virDomainRedirdevDefPtr redirdev,
VIR_WARN("OOM while encoding audit message"); VIR_WARN("OOM while encoding audit message");
goto cleanup; goto cleanup;
} }
break;
default: default:
VIR_WARN("Unexpected redirdev bus while encoding audit message: %d", VIR_WARN("Unexpected redirdev bus while encoding audit message: %d",
redirdev->bus); redirdev->bus);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册