[Qemu-devel] [PATCH 2/3] chardev: fix QemuOpts lifecycle

2012-12-14 Thread Gerd Hoffmann
qemu_chr_new_from_opts handles QemuOpts release now, so callers don't have to worry. It will either be saved in CharDriverState, then released in qemu_chr_delete, or in the error case released instantly. Signed-off-by: Gerd Hoffmann --- qemu-char.c | 15 ++- qemu-char.h |1 +

Re: [Qemu-devel] [PATCH 2/3] chardev: fix QemuOpts lifecycle

2012-10-18 Thread Luiz Capitulino
On Thu, 18 Oct 2012 11:26:39 +0200 Gerd Hoffmann wrote: > Hi, > > >> @@ -2864,6 +2868,7 @@ void qemu_chr_delete(CharDriverState *chr) > >> chr->chr_close(chr); > >> g_free(chr->filename); > >> g_free(chr->label); > >> +qemu_opts_del(chr->opts); > >> g_free(chr); > >

Re: [Qemu-devel] [PATCH 2/3] chardev: fix QemuOpts lifecycle

2012-10-18 Thread Gerd Hoffmann
Hi, >> @@ -2864,6 +2868,7 @@ void qemu_chr_delete(CharDriverState *chr) >> chr->chr_close(chr); >> g_free(chr->filename); >> g_free(chr->label); >> +qemu_opts_del(chr->opts); >> g_free(chr); >> } > > Didn't consider this in my first review, but is chardev_init_func(

Re: [Qemu-devel] [PATCH 2/3] chardev: fix QemuOpts lifecycle

2012-10-17 Thread Luiz Capitulino
On Wed, 17 Oct 2012 12:09:54 +0200 Gerd Hoffmann wrote: > qemu_chr_new_from_opts handles QemuOpts release now, so callers don't > have to worry. It will either be saved in CharDriverState, then > released in qemu_chr_delete, or in the error case released instantly. > > Signed-off-by: Gerd Hoffm

[Qemu-devel] [PATCH 2/3] chardev: fix QemuOpts lifecycle

2012-10-17 Thread Gerd Hoffmann
qemu_chr_new_from_opts handles QemuOpts release now, so callers don't have to worry. It will either be saved in CharDriverState, then released in qemu_chr_delete, or in the error case released instantly. Signed-off-by: Gerd Hoffmann --- qemu-char.c | 15 ++- qemu-char.h |1 +