From: Pierre Ossman Date: Fri, 24 May 2013 10:49:52 +0000 (+0000) Subject: Copy r5111 from trunk. X-Git-Tag: v1.3.0~6 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b77b0b2d2895f979e47794d58dd70124d8981642;p=tigervnc.git Copy r5111 from trunk. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/branches/1_3@5113 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- diff --git a/unix/xserver/hw/vnc/xvnc.cc b/unix/xserver/hw/vnc/xvnc.cc index 18a33488..cc1a010f 100644 --- a/unix/xserver/hw/vnc/xvnc.cc +++ b/unix/xserver/hw/vnc/xvnc.cc @@ -1353,6 +1353,7 @@ static Bool vncRandRInit(ScreenPtr pScreen) { RRCrtcPtr crtc; RRModePtr mode; + Bool ret; if (!RRInit()) return FALSE; @@ -1371,8 +1372,11 @@ static Bool vncRandRInit(ScreenPtr pScreen) if (mode == NULL) return FALSE; - vncRandRCrtcSet(pScreen, crtc, mode, 0, 0, RR_Rotate_0, - crtc->numOutputs, crtc->outputs); + ret = vncRandRCrtcSet(pScreen, crtc, mode, 0, 0, RR_Rotate_0, + crtc->numOutputs, crtc->outputs); + RRModeDestroy(mode); + if (!ret) + return FALSE; return TRUE; }