From: Barrett Schonefeld <bschoney(a)utexas.edu>
- src/util/virrotatingfile.c
Signed-off-by: Barrett Schonefeld <bschoney(a)utexas.edu>
---
src/util/virrotatingfile.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/util/virrotatingfile.c b/src/util/virrotatingfile.c
index 9f1ef17c3e..6d8076e7c4 100644
--- a/src/util/virrotatingfile.c
+++ b/src/util/virrotatingfile.c
@@ -362,8 +362,8 @@ static int
virRotatingFileWriterRollover(virRotatingFileWriterPtr file)
{
size_t i;
- char *nextpath = NULL;
- char *thispath = NULL;
+ g_autofree char *nextpath = NULL;
+ g_autofree char *thispath = NULL;
int ret = -1;
VIR_DEBUG("Rollover %s", file->basepath);
@@ -403,8 +403,6 @@ virRotatingFileWriterRollover(virRotatingFileWriterPtr file)
ret = 0;
cleanup:
- VIR_FREE(nextpath);
- VIR_FREE(thispath);
return ret;
}
--
2.29.0