Hi; Coverity has noticed a memory leak in hw/riscv/spike.c:
it malloc()s memory into config_string(), but never frees it.
(CID 1391015). This isn't a very serious leak since the function
only ever runs once, but it would be nice to fix this for 3.1
(it is the only coverity error in the riscv code, and one of
just 8 unaddressed for QEMU as a whole).

Incidentally, "malloc and then snprintf" would be better
done using g_strdup_printf(), which automatically allocates
sufficient memory for the string, avoiding the need to
try to pre-calculate the right size.

thanks
-- PMM

Reply via email to