mirror of https://gitee.com/openkylin/libvirt.git
qemuMigrationSrcFetchMirrorStats: Automatically free GHashTable
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
9e0995c821
commit
54a975ded6
|
@ -6235,7 +6235,7 @@ qemuMigrationSrcFetchMirrorStats(virQEMUDriver *driver,
|
||||||
size_t i;
|
size_t i;
|
||||||
qemuDomainObjPrivate *priv = vm->privateData;
|
qemuDomainObjPrivate *priv = vm->privateData;
|
||||||
bool nbd = false;
|
bool nbd = false;
|
||||||
GHashTable *blockinfo = NULL;
|
g_autoptr(GHashTable) blockinfo = NULL;
|
||||||
qemuDomainMirrorStats *stats = &jobInfo->mirrorStats;
|
qemuDomainMirrorStats *stats = &jobInfo->mirrorStats;
|
||||||
|
|
||||||
for (i = 0; i < vm->def->ndisks; i++) {
|
for (i = 0; i < vm->def->ndisks; i++) {
|
||||||
|
@ -6273,6 +6273,5 @@ qemuMigrationSrcFetchMirrorStats(virQEMUDriver *driver,
|
||||||
stats->total += data->end;
|
stats->total += data->end;
|
||||||
}
|
}
|
||||||
|
|
||||||
virHashFree(blockinfo);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue