render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
d76c62
From 4fd89121cecafd23bb45c517d5b8ff90d9b40a8f Mon Sep 17 00:00:00 2001
d76c62
Message-Id: <4fd89121cecafd23bb45c517d5b8ff90d9b40a8f@dist-git>
d76c62
From: Michal Privoznik <mprivozn@redhat.com>
d76c62
Date: Wed, 4 Mar 2020 12:42:34 +0100
d76c62
Subject: [PATCH] virDomainFSDefFree: Unref private data
d76c62
MIME-Version: 1.0
d76c62
Content-Type: text/plain; charset=UTF-8
d76c62
Content-Transfer-Encoding: 8bit
d76c62
d76c62
The privateData object is allocated in virDomainFSDefNew() but
d76c62
never unref'd.
d76c62
d76c62
==119642== 480 bytes in 20 blocks are definitely lost in loss record 656 of 671
d76c62
==119642==    at 0x4837B86: calloc (vg_replace_malloc.c:762)
d76c62
==119642==    by 0x57806A0: g_malloc0 (in /usr/lib64/libglib-2.0.so.0.6000.7)
d76c62
==119642==    by 0x4AE7392: virAllocVar (viralloc.c:331)
d76c62
==119642==    by 0x4B64395: virObjectNew (virobject.c:241)
d76c62
==119642==    by 0x48F1464: qemuDomainFSPrivateNew (qemu_domain.c:1427)
d76c62
==119642==    by 0x4BBF004: virDomainFSDefNew (domain_conf.c:2307)
d76c62
==119642==    by 0x4BD859A: virDomainFSDefParseXML (domain_conf.c:11217)
d76c62
==119642==    by 0x4BF9DD1: virDomainDefParseXML (domain_conf.c:21179)
d76c62
==119642==    by 0x4BFCD5B: virDomainDefParseNode (domain_conf.c:21943)
d76c62
==119642==    by 0x4BFCC36: virDomainDefParse (domain_conf.c:21901)
d76c62
==119642==    by 0x4BFCCCB: virDomainDefParseFile (domain_conf.c:21924)
d76c62
==119642==    by 0x114A9D: testCompareXMLToArgv (qemuxml2argvtest.c:452)
d76c62
d76c62
Fixes: 5120577ed79f89e172e3deed534fa9b585f4701f
d76c62
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
d76c62
Reviewed-by: Ján Tomko <jtomko@redhat.com>
d76c62
(cherry picked from commit d8b4f70e1e36772ef82dbe0f0706fa7845583e6c)
d76c62
Signed-off-by: Ján Tomko <jtomko@redhat.com>
d76c62
https://bugzilla.redhat.com/show_bug.cgi?id=1694166
d76c62
Message-Id: <77519310a2e8c09b41bfcc0c8e37b1c2dcb35b5c.1583322090.git.jtomko@redhat.com>
d76c62
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
d76c62
---
d76c62
 src/conf/domain_conf.c | 1 +
d76c62
 1 file changed, 1 insertion(+)
d76c62
d76c62
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
d76c62
index 88117187c8..990c5bcc1e 100644
d76c62
--- a/src/conf/domain_conf.c
d76c62
+++ b/src/conf/domain_conf.c
d76c62
@@ -2320,6 +2320,7 @@ void virDomainFSDefFree(virDomainFSDefPtr def)
d76c62
     VIR_FREE(def->dst);
d76c62
     virDomainDeviceInfoClear(&def->info);
d76c62
     VIR_FREE(def->virtio);
d76c62
+    virObjectUnref(def->privateData);
d76c62
 
d76c62
     VIR_FREE(def);
d76c62
 }
d76c62
-- 
d76c62
2.25.1
d76c62