Less intrusive workaround for sporadic segfault on resume.
Hopefully fixes fdo #24010 (memleak).
This commit is contained in:
parent
55747d256d
commit
977953bf14
|
@ -461,10 +461,6 @@ xf86_use_hw_cursor (ScreenPtr screen, CursorPtr cursor)
|
|||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
|
||||
|
||||
if (xf86_config->cursor == cursor) {
|
||||
xf86DrvMsg(index, X_ERROR, "Trying to set already set cursor.\n");
|
||||
return FALSE;
|
||||
}
|
||||
if (xf86_config->cursor)
|
||||
FreeCursor (xf86_config->cursor, None);
|
||||
xf86_config->cursor = cursor;
|
||||
|
@ -484,12 +480,14 @@ xf86_use_hw_cursor_argb (ScreenPtr screen, CursorPtr cursor)
|
|||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
|
||||
|
||||
if (xf86_config->cursor == cursor) {
|
||||
xf86DrvMsg(index, X_ERROR, "Trying to set already set cursor.\n");
|
||||
return FALSE;
|
||||
if (xf86_config->cursor) {
|
||||
/* Under some circumstances an already set cursor is set again.
|
||||
* If the pointer is freed, ->bits is killed */
|
||||
if (xf86_config->cursor != cursor)
|
||||
FreeCursor (xf86_config->cursor, None);
|
||||
else
|
||||
--cursor->refcnt;
|
||||
}
|
||||
if (xf86_config->cursor)
|
||||
FreeCursor (xf86_config->cursor, None);
|
||||
xf86_config->cursor = cursor;
|
||||
++cursor->refcnt;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user