Re: [PATCH] qom-qmp-cmds: remove unnecessary alloc in qmp_object_add to fix memleak

2020-04-06 Thread Paolo Bonzini
On 06/04/20 08:34, Markus Armbruster wrote: > Paolo, looks like this has fallen through the cracks. If you'd prefer > me to take it, let me know. > > Markus Armbruster writes: Actually it was in my latest pull request, but between this version, Marc-André and mine you might have missed it: co

Re: [PATCH] qom-qmp-cmds: remove unnecessary alloc in qmp_object_add to fix memleak

2020-04-05 Thread Markus Armbruster
Paolo, looks like this has fallen through the cracks. If you'd prefer me to take it, let me know. Markus Armbruster writes: > Pan Nengyuan writes: > >> In qmp_object_add(), user_creatable_add_type() may set errp with some error >> message and >> return NULL. In this case, qmp_object_add() sti

Re: [PATCH] qom-qmp-cmds: remove unnecessary alloc in qmp_object_add to fix memleak

2020-03-17 Thread Markus Armbruster
Pan Nengyuan writes: > In qmp_object_add(), user_creatable_add_type() may set errp with some error > message and > return NULL. In this case, qmp_object_add() still alloc memory to *ret_data > which return > to the caller and causes a memory leak. > > This patch do this alloc() action only if o