From 9fbb035e6f68e3675b3cb2492430d5e73cefad23 Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Thu, 7 Feb 2019 08:15:12 -0500 Subject: [PATCH] storage: Use VIR_STEAL_PTR in storageBackendProbeTarget MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: John Ferlan Reviewed-by: Erik Skultety Reviewed-by: Ján Tomko --- 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 a8feb1f84b..57624425d0 100644 --- a/src/storage/storage_util.c +++ b/src/storage/storage_util.c @@ -3492,13 +3492,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.47.2