virSecretLookupParseSecret: Use g_steal_pointer

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2021-01-06 15:59:59 +01:00
parent f07f1c479a
commit ece6cb354d

View File

@ -90,8 +90,7 @@ virSecretLookupParseSecret(xmlNodePtr secretnode,
} }
def->type = VIR_SECRET_LOOKUP_TYPE_UUID; def->type = VIR_SECRET_LOOKUP_TYPE_UUID;
} else { } else {
def->u.usage = usage; def->u.usage = g_steal_pointer(&usage);
usage = NULL;
def->type = VIR_SECRET_LOOKUP_TYPE_USAGE; def->type = VIR_SECRET_LOOKUP_TYPE_USAGE;
} }
return 0; return 0;