Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
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