mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
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…
x
Reference in New Issue
Block a user