On Thu, 18 Oct 2012 11:26:39 +0200 Gerd Hoffmann <kra...@redhat.com> 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); > >> } > > > > Didn't consider this in my first review, but is chardev_init_func() fine > > with this? Basically, if we chardev_remove a device created by it (is this > > possible?) then the opts will be freed but it will remain inserted in its > > QemuOptsList. > > Hmm? Don't see your issue here. > qemu_opts_del will also unlink from QemuOptsList ... Missed that fact, thanks for clarifying: Reviewed-by: Luiz Capitulino <lcapitul...@redhat.com>