Message ID | 20171020115418.2050-36-cohuck@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/target/s390x/helper.c b/target/s390x/helper.c index c41aa4c4ff..9ff7ff4acc 100644 --- a/target/s390x/helper.c +++ b/target/s390x/helper.c @@ -73,9 +73,9 @@ S390CPU *s390x_new_cpu(const char *typename, uint32_t core_id, Error **errp) object_property_set_bool(OBJECT(cpu), true, "realized", &err); out: + object_unref(OBJECT(cpu)); if (err) { error_propagate(errp, err); - object_unref(OBJECT(cpu)); cpu = NULL; } return cpu;