From 6954f21fd48b99a57130e25183f46776e97dbc28 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 7 May 2015 17:52:27 +0200 Subject: remove unnecessary null-checks, it is safe to pass NULL to free (per documentation) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/gamma-drm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/gamma-drm.c') diff --git a/src/gamma-drm.c b/src/gamma-drm.c index d431395..d15f3f6 100644 --- a/src/gamma-drm.c +++ b/src/gamma-drm.c @@ -190,8 +190,7 @@ drm_free(drm_state_t *state) if (state->crtcs != NULL) { drm_crtc_state_t *crtcs = state->crtcs; while (crtcs->crtc_num >= 0) { - if (crtcs->r_gamma != NULL) - free(crtcs->r_gamma); + free(crtcs->r_gamma); crtcs->crtc_num = -1; crtcs++; } -- cgit v1.2.3-70-g09d2