Re: [Qemu-devel] [PATCH] qapi: qapi-commands: fix possible leaks on visitor dealloc

2013-07-12 Thread Michael Roth
Quoting Luiz Capitulino (2013-07-12 09:42:02) > In qmp-marshal.c the dealloc visitor calls use the same errp > pointer of the input visitor calls. This means that if any of > the input visitor calls fails, then the dealloc visitor will > return early, before freeing the object's memory. > > Here's

[Qemu-devel] [PATCH] qapi: qapi-commands: fix possible leaks on visitor dealloc

2013-07-12 Thread Luiz Capitulino
In qmp-marshal.c the dealloc visitor calls use the same errp pointer of the input visitor calls. This means that if any of the input visitor calls fails, then the dealloc visitor will return early, before freeing the object's memory. Here's an example, consider this code: int qmp_marshal_input_bl