Blame SOURCES/libvirt-Fix-leak-in-x86UpdateHostModel.patch
|
|
898951 |
From 310634521378f3ae84f0f73293a591681f24648f Mon Sep 17 00:00:00 2001
|
|
|
898951 |
Message-Id: <310634521378f3ae84f0f73293a591681f24648f@dist-git>
|
|
|
898951 |
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
|
|
|
898951 |
Date: Thu, 18 Sep 2014 11:55:52 +0200
|
|
|
898951 |
Subject: [PATCH] Fix leak in x86UpdateHostModel
|
|
|
898951 |
|
|
|
898951 |
Commit de0aeaf introduced a memory leak.
|
|
|
898951 |
|
|
|
898951 |
(cherry picked from commit 5b5631dedf59e540661bfeac774e543d8d38531b)
|
|
|
898951 |
https://bugzilla.redhat.com/show_bug.cgi?id=1185458
|
|
|
898951 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
898951 |
---
|
|
|
898951 |
src/cpu/cpu_x86.c | 4 +++-
|
|
|
898951 |
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
898951 |
|
|
|
898951 |
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
|
|
|
898951 |
index 8ced69d..341a7f5 100644
|
|
|
898951 |
--- a/src/cpu/cpu_x86.c
|
|
|
898951 |
+++ b/src/cpu/cpu_x86.c
|
|
|
898951 |
@@ -2010,8 +2010,10 @@ x86UpdateHostModel(virCPUDefPtr guest,
|
|
|
898951 |
* features directly */
|
|
|
898951 |
for (i = 0; i < guest->nfeatures; i++) {
|
|
|
898951 |
for (feat = map->migrate_blockers; feat; feat = feat->next) {
|
|
|
898951 |
- if (STREQ(feat->name, guest->features[i].name))
|
|
|
898951 |
+ if (STREQ(feat->name, guest->features[i].name)) {
|
|
|
898951 |
+ VIR_FREE(guest->features[i].name);
|
|
|
898951 |
VIR_DELETE_ELEMENT_INPLACE(guest->features, i, guest->nfeatures);
|
|
|
898951 |
+ }
|
|
|
898951 |
}
|
|
|
898951 |
}
|
|
|
898951 |
|
|
|
898951 |
--
|
|
|
898951 |
2.2.2
|
|
|
898951 |
|