diff options
author | Jon Lund Steffensen <jonlst@gmail.com> | 2010-10-09 22:30:40 +0200 |
---|---|---|
committer | Jon Lund Steffensen <jonlst@gmail.com> | 2010-10-09 22:30:40 +0200 |
commit | e07cbc7b95c32cbaf9eb8c6cd1fd95eb31123f9f (patch) | |
tree | a7bd16991335c859c55da29923e30826552b6f30 /src/gamma-vidmode.c | |
parent | Merge status icon toggle button patch from Francesco Marella. (diff) | |
download | redshift-ng-e07cbc7b95c32cbaf9eb8c6cd1fd95eb31123f9f.tar.gz redshift-ng-e07cbc7b95c32cbaf9eb8c6cd1fd95eb31123f9f.tar.bz2 redshift-ng-e07cbc7b95c32cbaf9eb8c6cd1fd95eb31123f9f.tar.xz |
gamma-vidmode.c: Do not call XCloseDisplay() if vidmode_start() fails as
XCloseDisplay() will be called in vidmode_free().
Diffstat (limited to 'src/gamma-vidmode.c')
-rw-r--r-- | src/gamma-vidmode.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/gamma-vidmode.c b/src/gamma-vidmode.c index e6b9412..7b891d8 100644 --- a/src/gamma-vidmode.c +++ b/src/gamma-vidmode.c @@ -68,7 +68,6 @@ vidmode_start(vidmode_state_t *state) if (!r) { fprintf(stderr, _("X request failed: %s\n"), "XF86VidModeQueryVersion"); - XCloseDisplay(state->display); return -1; } @@ -78,14 +77,12 @@ vidmode_start(vidmode_state_t *state) if (!r) { fprintf(stderr, _("X request failed: %s\n"), "XF86VidModeGetGammaRampSize"); - XCloseDisplay(state->display); return -1; } if (state->ramp_size == 0) { fprintf(stderr, _("Gamma ramp size too small: %i\n"), state->ramp_size); - XCloseDisplay(state->display); return -1; } @@ -93,7 +90,6 @@ vidmode_start(vidmode_state_t *state) state->saved_ramps = malloc(3*state->ramp_size*sizeof(uint16_t)); if (state->saved_ramps == NULL) { perror("malloc"); - XCloseDisplay(state->display); return -1; } @@ -108,7 +104,6 @@ vidmode_start(vidmode_state_t *state) if (!r) { fprintf(stderr, _("X request failed: %s\n"), "XF86VidModeGetGammaRamp"); - XCloseDisplay(state->display); return -1; } |