aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/randr/rroutput.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/randr/rroutput.c')
-rw-r--r--xorg-server/randr/rroutput.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/xorg-server/randr/rroutput.c b/xorg-server/randr/rroutput.c
index 51ebaa861..1fd1f1846 100644
--- a/xorg-server/randr/rroutput.c
+++ b/xorg-server/randr/rroutput.c
@@ -134,8 +134,7 @@ RROutputSetClones (RROutputPtr output,
}
else
newClones = NULL;
- if (output->clones)
- free(output->clones);
+ free(output->clones);
memcpy (newClones, clones, numClones * sizeof (RROutputPtr));
output->clones = newClones;
output->numClones = numClones;
@@ -280,8 +279,7 @@ RROutputSetCrtcs (RROutputPtr output,
}
else
newCrtcs = NULL;
- if (output->crtcs)
- free(output->crtcs);
+ free(output->crtcs);
memcpy (newCrtcs, crtcs, numCrtcs * sizeof (RRCrtcPtr));
output->crtcs = newCrtcs;
output->numCrtcs = numCrtcs;
@@ -402,13 +400,10 @@ RROutputDestroyResource (pointer value, XID pid)
for (m = 0; m < output->numUserModes; m++)
RRModeDestroy (output->userModes[m]);
- if (output->userModes)
- free(output->userModes);
+ free(output->userModes);
- if (output->crtcs)
- free(output->crtcs);
- if (output->clones)
- free(output->clones);
+ free(output->crtcs);
+ free(output->clones);
RRDeleteAllOutputProperties (output);
free(output);
return 1;