From 4aef218d28ed66e80d882f052c704d92d11c3c81 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Tue, 16 Dec 2014 14:56:10 +0000 Subject: [PATCH] Randr: Fix null dereference. CID1181926 --- src/bin/e_randr.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/bin/e_randr.c b/src/bin/e_randr.c index bc6dde3f56..d7801294af 100644 --- a/src/bin/e_randr.c +++ b/src/bin/e_randr.c @@ -1094,21 +1094,20 @@ _e_randr_output_crtc_find(E_Randr_Output *output) goto done; } } - crtc = NULL; -done: +error: free(possible); free(modes); - output->crtcid = crtc->xid; - output->crtc = crtc; + output->crtc = NULL; return; -error: +done: free(possible); free(modes); - output->crtc = NULL; + output->crtcid = crtc->xid; + output->crtc = crtc; } static void -- 2.34.1