[libvirt] [PATCH 5/8] virVMXParseConfig: Don't leak def->videos

Ján Tomko jtomko at redhat.com
Fri Aug 4 14:56:02 UTC 2017


On Fri, Aug 04, 2017 at 04:22:33PM +0200, Michal Privoznik wrote:
>This function calls virDomainDefAddImplicitDevices() which adds
>implicit video device to domain definition. However, later in the
>process the function just ignores this and overwrites the @videos
>array without prior free.
>

We should not be calling virDomainDefAddImplicitDevices before
all the explicit devices are added to the domain definition.

What is the point of adding a device just to free it a few lines later?

Jan

>Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>---
> src/vmx/vmx.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170804/ee7b014f/attachment-0001.sig>


More information about the libvir-list mailing list