util: secret: convert pointers to use g_autofree

Signed-off-by: Barrett Schonefeld <bschoney@utexas.edu>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Barrett Schonefeld 2020-11-23 16:09:29 -06:00 committed by Ján Tomko
parent 005aeb3936
commit 5290d1000e

View File

@ -65,8 +65,8 @@ int
virSecretLookupParseSecret(xmlNodePtr secretnode, virSecretLookupParseSecret(xmlNodePtr secretnode,
virSecretLookupTypeDefPtr def) virSecretLookupTypeDefPtr def)
{ {
char *uuid; g_autofree char *uuid = NULL;
char *usage; g_autofree char *usage = NULL;
int ret = -1; int ret = -1;
uuid = virXMLPropString(secretnode, "uuid"); uuid = virXMLPropString(secretnode, "uuid");
@ -98,8 +98,6 @@ virSecretLookupParseSecret(xmlNodePtr secretnode,
ret = 0; ret = 0;
cleanup: cleanup:
VIR_FREE(uuid);
VIR_FREE(usage);
return ret; return ret;
} }