From: Pierre Ossman Date: Fri, 24 May 2013 10:35:33 +0000 (+0000) Subject: Fix bad reference counting of the initial randr mode set. X-Git-Tag: v1.3.90~102 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2b04fa44a515dd8754e5be83937b5e9e96ef982b;p=tigervnc.git Fix bad reference counting of the initial randr mode set. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5111 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- diff --git a/unix/xserver/hw/vnc/xvnc.cc b/unix/xserver/hw/vnc/xvnc.cc index abb71218..0fb099bc 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; }