提交 52d80511 编写于 作者: J Julio Faracco 提交者: Cole Robinson

conf: Fix memory leak caused by missing VIR_FREE for video resolution.

Commit 72862797 introduced resolution settings for QEMU video drivers.
It includes a new structure inside video definition. So, the code needs
to clear pointer allocation for that structure into clear function
virDomainVideoDefClear(). This commit adds this missing VIR_FREE().
Reviewed-by: NJonathon Jongsma <jjongsma@redhat.com>
Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
上级 fa061c92
...@@ -2826,6 +2826,7 @@ virDomainVideoDefClear(virDomainVideoDefPtr def) ...@@ -2826,6 +2826,7 @@ virDomainVideoDefClear(virDomainVideoDefPtr def)
if (def->accel) if (def->accel)
VIR_FREE(def->accel->rendernode); VIR_FREE(def->accel->rendernode);
VIR_FREE(def->accel); VIR_FREE(def->accel);
VIR_FREE(def->res);
VIR_FREE(def->virtio); VIR_FREE(def->virtio);
if (def->driver) if (def->driver)
VIR_FREE(def->driver->vhost_user_binary); VIR_FREE(def->driver->vhost_user_binary);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册