mirror of https://gitee.com/openkylin/libvirt.git
qemu: do not leak the directory in virQEMUDriverConfigLoadMemoryEntry
virConfGetValueString returns an allocated string that needs to be
freed.
Fixes: 34a59fb570
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
7ba0f441c3
commit
8da8cafdcb
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue