From: Barrett Schonefeld <bschoney(a)utexas.edu>
- src/util/virsecret.c
Signed-off-by: Barrett Schonefeld <bschoney(a)utexas.edu>
---
src/util/virsecret.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/util/virsecret.c b/src/util/virsecret.c
index 54d6bbcb7c..78a3b41bc5 100644
--- a/src/util/virsecret.c
+++ b/src/util/virsecret.c
@@ -65,8 +65,8 @@ int
virSecretLookupParseSecret(xmlNodePtr secretnode,
virSecretLookupTypeDefPtr def)
{
- char *uuid;
- char *usage;
+ g_autofree char *uuid = NULL;
+ g_autofree char *usage = NULL;
int ret = -1;
uuid = virXMLPropString(secretnode, "uuid");
@@ -98,8 +98,6 @@ virSecretLookupParseSecret(xmlNodePtr secretnode,
ret = 0;
cleanup:
- VIR_FREE(uuid);
- VIR_FREE(usage);
return ret;
}
--
2.29.0