|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH for-5.0] xen-block: Fix uninitialized variable
On 4/6/20 6:42 PM, Anthony PERARD wrote: Or move qobject_unref() after the error check? -- >8 -- diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c index 07bb32e22b..f3f1cbef65 100644 --- a/hw/block/xen-block.c +++ b/hw/block/xen-block.c@@ -869,7 +869,6 @@ static XenBlockIOThread *xen_block_iothread_create(const char *id,
qdict_put_str(opts, "id", id);
qmp_object_add(opts, &ret_data, &local_err);
qobject_unref(opts);
- qobject_unref(ret_data);
if (local_err) {
error_propagate(errp, local_err);
@@ -878,6 +877,7 @@ static XenBlockIOThread
*xen_block_iothread_create(const char *id,
g_free(iothread);
return NULL;
}
+ qobject_unref(ret_data);
return iothread;
}
---
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |