stats: fix memory leak in stat_segment_dump_r()
The built stat_segment_data_t is leaked if stat_segment_access_end() returns false. Type: fix Signed-off-by: Duncan Eastoe <duncan@graphiant.com> Change-Id: I70adabbe7947d3e8a798cdfb3eaa14c683dce9da
This commit is contained in:

committed by
Dave Wallace

parent
e211ac4886
commit
cf214cc600
@ -433,6 +433,8 @@ stat_segment_dump_r (uint32_t * stats, stat_client_main_t * sm)
|
||||
|
||||
fprintf (stderr, "Epoch changed while reading, invalid results\n");
|
||||
// TODO increase counter
|
||||
if (res)
|
||||
stat_segment_data_free (res);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user