diff options
Diffstat (limited to 'xorg-server/randr/rrmode.c')
-rw-r--r-- | xorg-server/randr/rrmode.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xorg-server/randr/rrmode.c b/xorg-server/randr/rrmode.c index 56e5977b5..f5d3f9e54 100644 --- a/xorg-server/randr/rrmode.c +++ b/xorg-server/randr/rrmode.c @@ -89,8 +89,10 @@ RRModeCreate(xRRModeInfo * modeInfo, const char *name, ScreenPtr userScreen) } mode->mode.id = FakeClientID(0); - if (!AddResource(mode->mode.id, RRModeType, (pointer) mode)) + if (!AddResource(mode->mode.id, RRModeType, (pointer) mode)) { + free(newModes); return NULL; + } modes = newModes; modes[num_modes++] = mode; |