Skip to content

Commit fc6008f

Browse files
elmarcodagrh
authored andcommitted
migration: fix pfd leak
Fix leak spotted by ASAN: Direct leak of 16 byte(s) in 1 object(s) allocated from: #0 0x7fe1abb80a38 in __interceptor_calloc (/lib64/libasan.so.4+0xdea38) #1 0x7fe1aaf1bf75 in g_malloc0 ../glib/gmem.c:124 #2 0x7fe1aaf1c249 in g_malloc0_n ../glib/gmem.c:355 #3 0x55f4841cfaa9 in postcopy_ram_fault_thread /home/elmarco/src/qemu/migration/postcopy-ram.c:596 #4 0x55f48479447b in qemu_thread_start /home/elmarco/src/qemu/util/qemu-thread-posix.c:504 #5 0x7fe1a043550a in start_thread (/lib64/libpthread.so.0+0x750a) Regression introduced with commit 00fa4fc. Signed-off-by: Marc-André Lureau <[email protected]> Message-Id: <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Peter Xu <[email protected]> Signed-off-by: Dr. David Alan Gilbert <[email protected]>
1 parent 47d3b60 commit fc6008f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

migration/postcopy-ram.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,7 @@ static void *postcopy_ram_fault_thread(void *opaque)
754754
}
755755
}
756756
trace_postcopy_ram_fault_thread_exit();
757+
g_free(pfd);
757758
return NULL;
758759
}
759760

0 commit comments

Comments
 (0)