tearing_control_v1: Free the wlr_tearing_control_v1 on error

Signed-off-by: YaoBing Xiao <xiaoyaobing@uniontech.com>
This commit is contained in:
YaoBing Xiao 2024-09-09 16:12:01 +08:00
parent 1a7981f7c9
commit 9f7ab85718

View File

@ -122,6 +122,7 @@ static void tearing_control_manager_handle_get_tearing_control(
wl_resource_get_version(resource), id); wl_resource_get_version(resource), id);
if (created_resource == NULL) { if (created_resource == NULL) {
free(hint);
wl_resource_post_no_memory(resource); wl_resource_post_no_memory(resource);
return; return;
} }