[libvirt] [PATCH 2/2] conf: fix vsock memory leaks
Peter Krempa
pkrempa at redhat.com
Wed May 30 14:21:04 UTC 2018
On Wed, May 30, 2018 at 16:08:07 +0200, Ján Tomko wrote:
> Introduced by:
> commit d4abb7b45d48aba77c2464dbea95f02a43a60834
> conf: introduce <vsock> element
> commit b8b42ca036adbfaac1741c8efe389cd1403e220b
> qemu: add support for vhost-vsock-pci
>
> Signed-off-by: Ján Tomko <jtomko at redhat.com>
> ---
> src/conf/domain_conf.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index 544f63a2a9..27e2bd50eb 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -2062,6 +2062,7 @@ virDomainVsockDefFree(virDomainVsockDefPtr vsock)
> return;
>
> virObjectUnref(vsock->privateData);
> + virDomainDeviceInfoClear(&vsock->info);
> VIR_FREE(vsock);
> }
>
> @@ -3092,6 +3093,7 @@ void virDomainDefFree(virDomainDefPtr def)
>
> virDomainMemballoonDefFree(def->memballoon);
> virDomainNVRAMDefFree(def->nvram);
> + virDomainVsockDefFree(def->vsock);
Oops, I was pretty sure I've seen this ... probably hallucinations.
>
> for (i = 0; i < def->mem.nhugepages; i++)
> virBitmapFree(def->mem.hugepages[i].nodemask);
ACK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180530/2c729d3c/attachment-0001.sig>
More information about the libvir-list
mailing list