diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2020-01-11 19:55:02 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-05-07 12:55:04 +0200 |
commit | 238a4b68197bce7c99d37cbefedde2a1b824a9b2 (patch) | |
tree | e919b9fee08fe318a5c16e62fe4540614f2e09b9 /nx-X11/programs/Xserver/Xext | |
parent | 192112d880cc369daa3e253588200a4d4f7b308d (diff) | |
download | nx-libs-238a4b68197bce7c99d37cbefedde2a1b824a9b2.tar.gz nx-libs-238a4b68197bce7c99d37cbefedde2a1b824a9b2.tar.bz2 nx-libs-238a4b68197bce7c99d37cbefedde2a1b824a9b2.zip |
Xext: Fix cursor reference counting hazard.
Backport of this xorg-xserver patch:
commit 3083c5d0c4386cdd7083b7a83ac72fdad2f1e61e
Author: Michel Dänzer <daenzer@vmware.com>
Date: Mon Mar 22 18:01:17 2010 +0100
Xext: Fix cursor reference counting hazard.
Make sure the reference count of the new cursor is increased before the old
one is decreased, otherwise bad things will happen if they're one and the
same and the reference count is 1 initially. Not sure this can actually happen
here, but better safe than sorry.
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'nx-X11/programs/Xserver/Xext')
-rw-r--r-- | nx-X11/programs/Xserver/Xext/saver.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nx-X11/programs/Xserver/Xext/saver.c b/nx-X11/programs/Xserver/Xext/saver.c index 65c43f6b4..a068b25ee 100644 --- a/nx-X11/programs/Xserver/Xext/saver.c +++ b/nx-X11/programs/Xserver/Xext/saver.c @@ -642,10 +642,10 @@ CreateSaverWindow (pScreen) FreeResource (pWin->drawable.id, RT_NONE); return FALSE; } + pAttr->pCursor->refcnt++; if (pWin->optional->cursor) FreeCursor (pWin->optional->cursor, (Cursor)0); pWin->optional->cursor = pAttr->pCursor; - pAttr->pCursor->refcnt++; pWin->cursorIsNone = FALSE; CheckWindowOptionalNeed (pWin); mask |= CWCursor; |