提交 8da8cafd 编写于 作者: J Ján Tomko

qemu: do not leak the directory in virQEMUDriverConfigLoadMemoryEntry

virConfGetValueString returns an allocated string that needs to be
freed.

Fixes: 34a59fb5Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
上级 7ba0f441
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册