]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
storage: Use VIR_STEAL_PTR in storageBackendProbeTarget
authorJohn Ferlan <jferlan@redhat.com>
Thu, 7 Feb 2019 13:15:12 +0000 (08:15 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 12 Feb 2019 13:51:23 +0000 (08:51 -0500)
Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/storage/storage_util.c

index a8feb1f84b80f5fffc5d936672937ff9e4cb766c..57624425d07ef38876d36edd85ec4ef1794e510b 100644 (file)
@@ -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: