mirror of https://gitee.com/openkylin/libvirt.git
Fix leak in x86UpdateHostModel
Commit de0aeaf
introduced a memory leak.
This commit is contained in:
parent
288c47406c
commit
5b5631dedf
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue