RE: [PATCH] qemu_conf: Fix double free problem for cfg->firmwares

2020-12-02 Thread Tuguoyi
> -Original Message- > From: Michal Privoznik [mailto:mpriv...@redhat.com] > Sent: Tuesday, December 01, 2020 9:28 PM > To: tuguoyi (Cloud) ; Ján Tomko > Cc: libvir-list@redhat.com > Subject: Re: [PATCH] qemu_conf: Fix double free problem for cfg->firmwares &g

Re: [PATCH] qemu_conf: Fix double free problem for cfg->firmwares

2020-12-01 Thread Ján Tomko
On a Tuesday in 2020, Michal Privoznik wrote: On 12/1/20 2:50 AM, Tuguoyi wrote: -Original Message- From: Ján Tomko [mailto:jto...@redhat.com] Sent: Tuesday, November 24, 2020 6:57 PM To: tuguoyi (Cloud) Cc: libvir-list@redhat.com Subject: Re: [PATCH] qemu_conf: Fix double free problem

Re: [PATCH] qemu_conf: Fix double free problem for cfg->firmwares

2020-12-01 Thread Michal Privoznik
On 12/1/20 2:50 AM, Tuguoyi wrote: -Original Message- From: Ján Tomko [mailto:jto...@redhat.com] Sent: Tuesday, November 24, 2020 6:57 PM To: tuguoyi (Cloud) Cc: libvir-list@redhat.com Subject: Re: [PATCH] qemu_conf: Fix double free problem for cfg->firmwares On a Tuesday in 2

RE: [PATCH] qemu_conf: Fix double free problem for cfg->firmwares

2020-11-30 Thread Tuguoyi
> -Original Message- > From: Ján Tomko [mailto:jto...@redhat.com] > Sent: Tuesday, November 24, 2020 6:57 PM > To: tuguoyi (Cloud) > Cc: libvir-list@redhat.com > Subject: Re: [PATCH] qemu_conf: Fix double free problem for cfg->firmwares > > On a Tuesday in

RE: [PATCH] qemu_conf: Fix double free problem for cfg->firmwares

2020-11-24 Thread Tuguoyi
On a Tuesday in 2020, Ján Tomko wrote: > On a Tuesday in 2020, Tuguoyi wrote: > >cfg->firmwares still points to the original memory address after being > >freed by virFirmwareFreeList(). As cfg get freed, it will be freed again > >even if cfg->nfirmwares=0 which eventually lead to crash. > > > >The

Re: [PATCH] qemu_conf: Fix double free problem for cfg->firmwares

2020-11-24 Thread Ján Tomko
On a Tuesday in 2020, Tuguoyi wrote: cfg->firmwares still points to the original memory address after being freed by virFirmwareFreeList(). As cfg get freed, it will be freed again even if cfg->nfirmwares=0 which eventually lead to crash. The patch fix it by setting cfg->firmwares to NULL explic