提交 5b5631de 编写于 作者: J Ján Tomko

Fix leak in x86UpdateHostModel

Commit de0aeafe introduced a memory leak.
上级 288c4740
......@@ -2094,8 +2094,10 @@ x86UpdateHostModel(virCPUDefPtr guest,
* features directly */
for (i = 0; i < guest->nfeatures; i++) {
for (feat = map->migrate_blockers; feat; feat = feat->next) {
if (STREQ(feat->name, guest->features[i].name))
if (STREQ(feat->name, guest->features[i].name)) {
VIR_FREE(guest->features[i].name);
VIR_DELETE_ELEMENT_INPLACE(guest->features, i, guest->nfeatures);
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册