From: John Ferlan Date: Thu, 7 Feb 2019 13:15:12 +0000 (-0500) Subject: storage: Use VIR_STEAL_PTR in storageBackendProbeTarget X-Git-Tag: v5.1.0-rc1~119 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9fbb035e6f68e3675b3cb2492430d5e73cefad23;p=thirdparty%2Flibvirt.git storage: Use VIR_STEAL_PTR in storageBackendProbeTarget Signed-off-by: John Ferlan Reviewed-by: Erik Skultety Reviewed-by: Ján Tomko --- 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: