mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 07:17:44 +00:00
libxl: fix potential double free in libxlDriverGetDom0MaxmemConf
Commit 4ab0c959
fixed a memory leak in libxlDriverGetDom0MaxmemConf
but introduced a potential double free of mem_tokens
*** Error in `/usr/sbin/libvirtd': double free or corruption (out):
0x00007fffc808cfd0 ***
Avoid double free by setting mem_tokens to NULL after calling
virStringListFree.
This commit is contained in:
parent
b5ac475f50
commit
2dc1cf19db
@ -1623,6 +1623,7 @@ libxlDriverGetDom0MaxmemConf(libxlDriverConfigPtr cfg,
|
||||
}
|
||||
}
|
||||
virStringListFree(mem_tokens);
|
||||
mem_tokens = NULL;
|
||||
}
|
||||
|
||||
physmem:
|
||||
|
Loading…
Reference in New Issue
Block a user