* src/conf/domain_event.c (virDomainEventGraphicsNewFromDom):
Return NULL when handling out-of-memory error, rather than
falling through with ev=NULL and then assigning to ev->member.
(virDomainEventGraphicsNewFromObj): Likewise.
ev->data.graphics.phase = phase;
if (!(ev->data.graphics.authScheme = strdup(authScheme))) {
virDomainEventFree(ev);
- ev = NULL;
+ return NULL;
}
ev->data.graphics.local = local;
ev->data.graphics.remote = remote;
ev->data.graphics.phase = phase;
if (!(ev->data.graphics.authScheme = strdup(authScheme))) {
virDomainEventFree(ev);
- ev = NULL;
+ return NULL;
}
ev->data.graphics.local = local;
ev->data.graphics.remote = remote;