1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

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;
} else {
def->u.usage = usage;
usage = NULL;
def->u.usage = g_steal_pointer(&usage);
def->type = VIR_SECRET_LOOKUP_TYPE_USAGE;
}
return 0;