[PATCH 3/7] virSecretLookupParseSecret: Use g_steal_pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/util/virsecret.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/util/virsecret.c b/src/util/virsecret.c
index 9ed803d45b..57c8583539 100644
--- a/src/util/virsecret.c
+++ b/src/util/virsecret.c
@@ -90,8 +90,7 @@ virSecretLookupParseSecret(xmlNodePtr secretnode,
         }
         def->type = VIR_SECRET_LOOKUP_TYPE_UUID;
     } else {
-        def->u.usage = usage;
-        usage = NULL;
+        def->u.usage = g_steal_pointer(&usage);
         def->type = VIR_SECRET_LOOKUP_TYPE_USAGE;
     }
     return 0;
-- 
2.29.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux