fix(vg_lite): fix stroke path memory leak (#5883)
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com> Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
@@ -104,9 +104,8 @@ void lv_vg_lite_path_destroy(lv_vg_lite_path_t * path)
|
|||||||
lv_free(path->base.path);
|
lv_free(path->base.path);
|
||||||
path->base.path = NULL;
|
path->base.path = NULL;
|
||||||
|
|
||||||
if(path->base.stroke) {
|
/* clear remaining path data */
|
||||||
LV_LOG_ERROR("can't free stroke path");
|
LV_VG_LITE_CHECK_ERROR(vg_lite_clear_path(&path->base));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
lv_free(path);
|
lv_free(path);
|
||||||
LV_PROFILER_END;
|
LV_PROFILER_END;
|
||||||
|
|||||||
@@ -888,7 +888,7 @@ extern "C" {
|
|||||||
path->stroke = NULL;
|
path->stroke = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return VG_LITE_NOT_SUPPORT;
|
return VG_LITE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
vg_lite_uint32_t vg_lite_get_path_length(vg_lite_uint8_t * opcode,
|
vg_lite_uint32_t vg_lite_get_path_length(vg_lite_uint8_t * opcode,
|
||||||
@@ -2136,9 +2136,7 @@ static Result shape_append_path(std::unique_ptr<Shape> & shape, vg_lite_path_t *
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case VLC_OP_CLOSE:
|
case VLC_OP_CLOSE:
|
||||||
case VLC_OP_END: {
|
|
||||||
TVG_CHECK_RETURN_RESULT(shape->close());
|
TVG_CHECK_RETURN_RESULT(shape->close());
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user