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

Ján Tomko jtomko at redhat.com
Tue Nov 24 10:57:03 UTC 2020


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 explicitly after
>virFirmwareFreeList() returns
>
>Signed-off-by: Tuguoyi <tu.guoyi at h3c.com>

Should there be a space separating your name(s)?

>---
> src/qemu/qemu_conf.c | 1 +
> 1 file changed, 1 insertion(+)
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20201124/a0d63357/attachment-0001.sig>


More information about the libvir-list mailing list