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