Re: [PATCH v2] system/vl: Free allocate memory for pid file name in case realpath() failed
Fiona Ebner <[email protected]> Mon, 18 May 2026 14:43:04 +0200
| Newsgroups | org.nongnu.qemu-trivial,org.nongnu.qemu-devel |
|---|---|
| Message-ID | <[email protected]> |
Am 18.05.26 um 1:45 PM schrieb Thomas Huth: > 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]> Reviewed-by: Fiona Ebner <[email protected]>