Skip to content

Commit 95bb7ac

Browse files
6by9pelwell
authored andcommitted
drm: Fix double free from checking if gamma lut has been updated
The code falls through to "fail" under all conditions, so there is no need for the drm_property_blob_put if the gamma lut hasn't been changed. Fixes: 9cca266 "drm: Check whether the gamma lut has changed before updating" Signed-off-by: Dave Stevenson <[email protected]>
1 parent a965fb8 commit 95bb7ac

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/gpu/drm/drm_color_mgmt.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,6 @@ static int drm_crtc_legacy_gamma_set(struct drm_crtc *crtc,
330330
memcmp(crtc_state->gamma_lut->data, blob_data, blob->length))
331331
replaced |= drm_property_replace_blob(&crtc_state->gamma_lut,
332332
use_gamma_lut ? blob : NULL);
333-
else
334-
drm_property_blob_put(blob);
335333
crtc_state->color_mgmt_changed |= replaced;
336334

337335
ret = drm_atomic_commit(state);

0 commit comments

Comments
 (0)