Re: [Qemu-devel] [PATCH v2] qapi: fix memory leak in QmpOutputVisitor

2016-10-23 Thread Markus Armbruster
Eric Blake writes: > On 10/21/2016 04:32 PM, Eric Blake wrote: >> In fact, applying this patch regresses to the very state that f24582d >> tried to prevent. However, I'm unable to see a difference in valgrind >> on tests/test-qmp-output-visitor either with or without this patch, >> which sadly m

Re: [Qemu-devel] [PATCH v2] qapi: fix memory leak in QmpOutputVisitor

2016-10-21 Thread Eric Blake
On 10/21/2016 04:32 PM, Eric Blake wrote: > In fact, applying this patch regresses to the very state that f24582d > tried to prevent. However, I'm unable to see a difference in valgrind > on tests/test-qmp-output-visitor either with or without this patch, > which sadly means our testsuite is not a

Re: [Qemu-devel] [PATCH v2] qapi: fix memory leak in QmpOutputVisitor

2016-10-21 Thread Eric Blake
On 10/21/2016 10:39 AM, Eric Blake wrote: > On 10/21/2016 09:01 AM, Markus Armbruster wrote: >> Pino Toscano writes: >> >>> qmp_output_start_struct() and qmp_output_start_list() create a new >>> QObject (QDict, QList) and push it to the stack of the QmpOutputVisitor, >>> where it is saved as 'valu

Re: [Qemu-devel] [PATCH v2] qapi: fix memory leak in QmpOutputVisitor

2016-10-21 Thread Eric Blake
On 10/21/2016 09:01 AM, Markus Armbruster wrote: > Pino Toscano writes: > >> qmp_output_start_struct() and qmp_output_start_list() create a new >> QObject (QDict, QList) and push it to the stack of the QmpOutputVisitor, >> where it is saved as 'value'. When freeing the iterator in >> qmp_output_

Re: [Qemu-devel] [PATCH v2] qapi: fix memory leak in QmpOutputVisitor

2016-10-21 Thread Markus Armbruster
Pino Toscano writes: > qmp_output_start_struct() and qmp_output_start_list() create a new > QObject (QDict, QList) and push it to the stack of the QmpOutputVisitor, > where it is saved as 'value'. When freeing the iterator in > qmp_output_free(), these values are never freed properly. > > The si

[Qemu-devel] [PATCH v2] qapi: fix memory leak in QmpOutputVisitor

2016-10-18 Thread Pino Toscano
qmp_output_start_struct() and qmp_output_start_list() create a new QObject (QDict, QList) and push it to the stack of the QmpOutputVisitor, where it is saved as 'value'. When freeing the iterator in qmp_output_free(), these values are never freed properly. The simple solution is to qobject_decref