26 lines
771 B
Diff
26 lines
771 B
Diff
|
|
From 9ebad9c3020625df0a178e6a2d06eaae15ef767c Mon Sep 17 00:00:00 2001
|
||
|
|
From: Chuan Zheng <zhengchuan@huawei.com>
|
||
|
|
Date: Wed, 9 Feb 2022 12:51:19 +0800
|
||
|
|
Subject: [PATCH] cpu/features: fix bug for memory leakage
|
||
|
|
|
||
|
|
strList hash not free after used, Fix it.
|
||
|
|
---
|
||
|
|
target/i386/cpu.c | 1 +
|
||
|
|
1 file changed, 1 insertion(+)
|
||
|
|
|
||
|
|
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
|
||
|
|
index fc61a84b1e..f94405c02b 100644
|
||
|
|
--- a/target/i386/cpu.c
|
||
|
|
+++ b/target/i386/cpu.c
|
||
|
|
@@ -5475,6 +5475,7 @@ static void x86_cpu_get_unavailable_features(Object *obj, Visitor *v,
|
||
|
|
|
||
|
|
x86_cpu_list_feature_names(xc->filtered_features, &result);
|
||
|
|
visit_type_strList(v, "unavailable-features", &result, errp);
|
||
|
|
+ qapi_free_strList(result);
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Print all cpuid feature names in featureset
|
||
|
|
--
|
||
|
|
2.27.0
|
||
|
|
|