On Wed, 2 Mar 2022 at 08:33, Cédric Le Goater <[email protected]> wrote: > > From: Wentao_Liang <[email protected]> > > A memory chunk is allocated with g_new0() and assigned to the variable > 'storage'. However, if the branch takes true, there will be only an > error report but not a free operation for 'storage' before function > returns. As a result, a memory leak bug is triggered. > > Use g_autofree to fix the issue. > > Suggested-by: Philippe Mathieu-Daudé <[email protected]> > Signed-off-by: Wentao_Liang <[email protected]> > [ clg: reworked the commit log ] > Signed-off-by: Cédric Le Goater <[email protected]>
Reviewed-by: Peter Maydell <[email protected]> thanks -- PMM
