1
0
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:
Peter 2023-12-13 15:44:20 +01:00 committed by GitHub
parent b7a20df38f
commit 6c66a491b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);