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:
Peter Krempa 2021-11-30 11:42:17 +01:00
parent 9e0995c821
commit 54a975ded6
1 changed files with 1 additions and 2 deletions

View File

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