Signed-off-by: Tim Wiederhake <twiederh(a)redhat.com>
---
tests/commandhelper.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tests/commandhelper.c b/tests/commandhelper.c
index 26a7de5149..3bd7d2b28d 100644
--- a/tests/commandhelper.c
+++ b/tests/commandhelper.c
@@ -172,7 +172,7 @@ static void printDaemonization(FILE *log, struct Arguments *args)
static int printCwd(FILE *log)
{
- char *cwd = NULL;
+ g_autofree char *cwd = NULL;
char *display;
if (!(cwd = getcwd(NULL, 0)))
@@ -191,7 +191,6 @@ static int printCwd(FILE *log)
# endif
fprintf(log, "CWD:%s\n", display);
- free(cwd);
return 0;
}
--
2.26.2