diff --git a/src/conf/domain_event.c b/src/conf/domain_event.c index e5bd4583477b28b32755e47208bcef05092f7fa3..e88aafea8cb2a5377d18b35db46f2f0ef98c48f5 100644 --- a/src/conf/domain_event.c +++ b/src/conf/domain_event.c @@ -671,7 +671,7 @@ static virDomainEventPtr virDomainEventIOErrorNewFromObjImpl(int event, ev->data.ioError.action = action; if (!(ev->data.ioError.srcPath = strdup(srcPath)) || !(ev->data.ioError.devAlias = strdup(devAlias)) || - !(ev->data.ioError.reason = strdup(reason))) { + (reason && !(ev->data.ioError.reason = strdup(reason)))) { virDomainEventFree(ev); ev = NULL; }