migration: Don't try to set *errp directly

Assigning directly to *errp is not valid, as errp may be NULL,
&error_fatal, or &error_abort.  Use error_propagate() instead.

Cc: Juan Quintela <quintela@redhat.com>
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
Eduardo Habkost 2017-06-08 10:39:05 -03:00 committed by Juan Quintela
parent 0425dc9762
commit 250561e1ae

View File

@ -1179,7 +1179,7 @@ bool migration_is_blocked(Error **errp)
}
if (migration_blockers) {
*errp = error_copy(migration_blockers->data);
error_propagate(errp, error_copy(migration_blockers->data));
return true;
}