On 18/5/26 13:45, Thomas Huth wrote:
From: Thomas Huth <[email protected]>

In case realpath() fails, the code returns early in the function
qemu_maybe_daemonize(), without freeing the allocated memory. Add
a g_free() here to fix it.
And while we're at it, also free the memory in the qemu_unlink_pidfile()
function - it's not that important since QEMU is going to terminate anyway,
but some malloc sanitizers might still complain if we don't free it.

Fixes: dee2a4d4d2f ("vl: defuse PID file path resolve error")
Signed-off-by: Thomas Huth <[email protected]>
---
  v2: Free memory in qemu_unlink_pidfile(), too

  system/vl.c | 3 +++
  1 file changed, 3 insertions(+)

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>

Reply via email to