Re: [PATCH for-5.0] xen-block: Fix uninitialized variable

2020-04-06 Thread Markus Armbruster
Anthony PERARD writes: > On Mon, Apr 06, 2020 at 06:50:41PM +0200, Philippe Mathieu-Daudé wrote: >> On 4/6/20 6:42 PM, Anthony PERARD wrote: >> > Since 7f5d9b206d1e ("object-add: don't create return value if >> > failed"), qmp_object_add() don't write any value in 'ret_data', thus >> > has random

Re: [PATCH for-5.0] xen-block: Fix uninitialized variable

2020-04-06 Thread Anthony PERARD
On Mon, Apr 06, 2020 at 06:50:41PM +0200, Philippe Mathieu-Daudé wrote: > On 4/6/20 6:42 PM, Anthony PERARD wrote: > > Since 7f5d9b206d1e ("object-add: don't create return value if > > failed"), qmp_object_add() don't write any value in 'ret_data', thus > > has random data. Then qobject_unref() fai

Re: [PATCH for-5.0] xen-block: Fix uninitialized variable

2020-04-06 Thread Philippe Mathieu-Daudé
On 4/6/20 6:42 PM, Anthony PERARD wrote: Since 7f5d9b206d1e ("object-add: don't create return value if failed"), qmp_object_add() don't write any value in 'ret_data', thus has random data. Then qobject_unref() fails and abort(). Fix by initialising 'ret_data' properly. Or move qobject_unref()

[PATCH for-5.0] xen-block: Fix uninitialized variable

2020-04-06 Thread Anthony PERARD
Since 7f5d9b206d1e ("object-add: don't create return value if failed"), qmp_object_add() don't write any value in 'ret_data', thus has random data. Then qobject_unref() fails and abort(). Fix by initialising 'ret_data' properly. Fixes: 5f07c4d60d09 ("qapi: Flatten object-add") Signed-off-by: Anth