virConfGetValueString returns an allocated string that needs to be
freed.
Fixes: 34a59fb570dcc1b6b4b4cef1f0eb43fc6f688120
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/qemu/qemu_conf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 2d5e527b47..2d4e2a46f3 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -969,7 +969,7 @@ static int
virQEMUDriverConfigLoadMemoryEntry(virQEMUDriverConfigPtr cfg,
virConfPtr conf)
{
- char *dir = NULL;
+ g_autofree char *dir = NULL;
int rc;
if ((rc = virConfGetValueString(conf, "memory_backing_dir", &dir)) <
0) {
--
2.25.4