1
0
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:
Ján Tomko 2014-09-18 11:55:52 +02:00
parent 288c47406c
commit 5b5631dedf

View File

@ -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);
}
}
}