[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/3] chardev: fix QemuOpts lifecycle
From: |
Luiz Capitulino |
Subject: |
Re: [Qemu-devel] [PATCH 2/3] chardev: fix QemuOpts lifecycle |
Date: |
Thu, 18 Oct 2012 10:30:25 -0300 |
On Thu, 18 Oct 2012 11:26:39 +0200
Gerd Hoffmann <address@hidden> 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 <address@hidden>