1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-26 03:21:44 +03:00

storage: Use VIR_STEAL_PTR in storageBackendProbeTarget

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
John Ferlan 2019-02-07 08:15:12 -05:00
parent 5f02df444b
commit 9fbb035e6f

View File

@ -3492,13 +3492,11 @@ storageBackendProbeTarget(virStorageSourcePtr target,
} }
virBitmapFree(target->features); virBitmapFree(target->features);
target->features = meta->features; VIR_STEAL_PTR(target->features, meta->features);
meta->features = NULL;
if (meta->compat) { if (meta->compat) {
VIR_FREE(target->compat); VIR_FREE(target->compat);
target->compat = meta->compat; VIR_STEAL_PTR(target->compat, meta->compat);
meta->compat = NULL;
} }
cleanup: cleanup: