[libvirt] [PATCH v2] qemu: monitor: Fix a memory leak in qemuMonitorJSONAttachCharDevCommand

Pavel Hrdina phrdina at redhat.com
Wed Jun 14 08:40:44 UTC 2017

On Wed, Jun 14, 2017 at 09:10:15AM +0200, Erik Skultety wrote:
> With the current logic, we only free @tlsalias as part of the error
> label and would have to free it explicitly earlier in the code. Convert
> the error label to cleanup, so that we have only one sink, where we
> handle all frees. Since since JSON object append operation consumes

s/Since since/Since/

> pointers, make sure @backend is cleared before we hit the cleanup label.
> Signed-off-by: Erik Skultety <eskultet at redhat.com>
> ---
>  src/qemu/qemu_monitor_json.c | 41 ++++++++++++++++++++---------------------
>  1 file changed, 20 insertions(+), 21 deletions(-)

Reviewed-by: Pavel Hrdina <phrdina at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170614/60762e1b/attachment-0001.sig>

More information about the libvir-list mailing list