aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nx-X11/programs/Xserver/randr/rrmode.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/nx-X11/programs/Xserver/randr/rrmode.c b/nx-X11/programs/Xserver/randr/rrmode.c
index 09c011350..43ffe0705 100644
--- a/nx-X11/programs/Xserver/randr/rrmode.c
+++ b/nx-X11/programs/Xserver/randr/rrmode.c
@@ -98,8 +98,10 @@ RRModeCreate (xRRModeInfo *modeInfo,
}
mode->mode.id = FakeClientID(0);
- if (!AddResource (mode->mode.id, RRModeType, (pointer) mode))
- return NULL;
+ if (!AddResource(mode->mode.id, RRModeType, (pointer) mode)) {
+ free(newModes);
+ return NULL;
+ }
modes = newModes;
modes[num_modes++] = mode;