conf: add missing break in virDomainAuditRedirdev

Also initialize to NULL a few variables that might get
free before being set.
This commit is contained in:
Marc-André Lureau 2011-09-14 22:02:30 +02:00 committed by Eric Blake
parent 247726bf38
commit dd428d4798

View File

@ -246,8 +246,8 @@ virDomainAuditHostdev(virDomainObjPtr vm, virDomainHostdevDefPtr hostdev,
{
char uuidstr[VIR_UUID_STRING_BUFLEN];
char *vmname;
char *address;
char *device;
char *address = NULL;
char *device = NULL;
const char *virt;
virUUIDFormat(vm->def->uuid, uuidstr);
@ -319,8 +319,8 @@ virDomainAuditRedirdev(virDomainObjPtr vm, virDomainRedirdevDefPtr redirdev,
{
char uuidstr[VIR_UUID_STRING_BUFLEN];
char *vmname;
char *address;
char *device;
char *address = NULL;
char *device = NULL;
const char *virt;
virUUIDFormat(vm->def->uuid, uuidstr);
@ -340,6 +340,7 @@ virDomainAuditRedirdev(virDomainObjPtr vm, virDomainRedirdevDefPtr redirdev,
VIR_WARN("OOM while encoding audit message");
goto cleanup;
}
break;
default:
VIR_WARN("Unexpected redirdev bus while encoding audit message: %d",
redirdev->bus);