mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
fix(chart): fix memory leak in lv_chart_remove_series (#5001)
Co-authored-by: Peter Hjärtquist <peter.hjartquist@btg.com>
This commit is contained in:
parent
b7a20df38f
commit
6c66a491b8
@ -389,6 +389,7 @@ void lv_chart_remove_series(lv_obj_t * obj, lv_chart_series_t * series)
|
||||
|
||||
lv_chart_t * chart = (lv_chart_t *)obj;
|
||||
if(!series->y_ext_buf_assigned && series->y_points) lv_mem_free(series->y_points);
|
||||
if(!series->x_ext_buf_assigned && series->x_points) lv_mem_free(series->x_points);
|
||||
|
||||
_lv_ll_remove(&chart->series_ll, series);
|
||||
lv_mem_free(series);
|
||||
|
Loading…
x
Reference in New Issue
Block a user