diff options
author | Pierre Ossman <ossman@cendio.se> | 2013-05-24 10:35:33 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2013-05-24 10:35:33 +0000 |
commit | 2b04fa44a515dd8754e5be83937b5e9e96ef982b (patch) | |
tree | fcec26e44f57c19cdd60e53fbcc8d1854ef44b00 /unix/xserver | |
parent | 40550116f56a5268ecdcdcf38db91d3b553e8811 (diff) | |
download | tigervnc-2b04fa44a515dd8754e5be83937b5e9e96ef982b.tar.gz tigervnc-2b04fa44a515dd8754e5be83937b5e9e96ef982b.zip |
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
Diffstat (limited to 'unix/xserver')
-rw-r--r-- | unix/xserver/hw/vnc/xvnc.cc | 8 |
1 files changed, 6 insertions, 2 deletions
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; } |