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 ed88e6511..757f6f23c 100644
--- a/xorg-server/randr/rroutput.c
+++ b/xorg-server/randr/rroutput.c
@@ -139,8 +139,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;
@@ -285,8 +284,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;
@@ -407,13 +405,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;