diff options
Diffstat (limited to 'target/s390x/helper.c')
-rw-r--r-- | target/s390x/helper.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |