From f204bac46c75e3c51233460d784dbdc833354638 Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Mon, 26 Apr 2021 10:35:40 +0900 Subject: avoid the double free Change-Id: Ie120e36df3bbf0e804c3d122b8eadca276a4351f --- src/libtdm-vc4/tdm_vc4_display.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/libtdm-vc4/tdm_vc4_display.c b/src/libtdm-vc4/tdm_vc4_display.c index 432c1bf..49ab114 100644 --- a/src/libtdm-vc4/tdm_vc4_display.c +++ b/src/libtdm-vc4/tdm_vc4_display.c @@ -1558,7 +1558,6 @@ _vc4_output_make_atomic_request(tdm_vc4_output_data *output_data, drmModeAtomicR current_mode = _tdm_vc4_display_get_mode(output_data); if (!current_mode) { TDM_ERR("couldn't find proper mode"); - drmModeAtomicFree(request); return TDM_ERROR_BAD_REQUEST; } @@ -1575,7 +1574,6 @@ _vc4_output_make_atomic_request(tdm_vc4_output_data *output_data, drmModeAtomicR output_data->atomic_props_ids.crtc_id, output_data->crtc_id); if (ret < 0) { TDM_ERR("fail to set crtc error:%d", errno); - drmModeAtomicFree(request); return ret; } @@ -1583,7 +1581,6 @@ _vc4_output_make_atomic_request(tdm_vc4_output_data *output_data, drmModeAtomicR output_data->atomic_props_ids.crtc_mode_id, output_data->current_mode_blob_id); if (ret < 0) { TDM_ERR("fail to set mode error:%d", errno); - drmModeAtomicFree(request); return ret; } @@ -1591,7 +1588,6 @@ _vc4_output_make_atomic_request(tdm_vc4_output_data *output_data, drmModeAtomicR output_data->atomic_props_ids.crtc_active, 1); if (ret < 0) { TDM_ERR("fail to set active error:%d", errno); - drmModeAtomicFree(request); return ret; } @@ -1607,7 +1603,6 @@ _vc4_output_make_atomic_request(tdm_vc4_output_data *output_data, drmModeAtomicR output_data->atomic_props_ids.out_fence_ptr, (uintptr_t)out_fence_fd); if (ret < 0) { TDM_ERR("fail to out fence ptr error:%d", errno); - drmModeAtomicFree(request); return ret; } -- cgit v1.2.3