Signed-off-by: John Ferlan <jferlan(a)redhat.com>
Reviewed-by: Erik Skultety <eskultet(a)redhat.com>
---
src/storage/storage_util.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c
index 012c6b319b..af6ab20ea6 100644
--- a/src/storage/storage_util.c
+++ b/src/storage/storage_util.c
@@ -3450,13 +3450,11 @@ storageBackendProbeTarget(virStorageSourcePtr target,
}
virBitmapFree(target->features);
- target->features = meta->features;
- meta->features = NULL;
+ VIR_STEAL_PTR(target->features, meta->features);
if (meta->compat) {
VIR_FREE(target->compat);
- target->compat = meta->compat;
- meta->compat = NULL;
+ VIR_STEAL_PTR(target->compat, meta->compat);
}
cleanup:
--
2.20.1