xcb: Do not leak when compressing events
The event must be freed in all cases, also when a motion or configure notify is skipped. Change-Id: Ie55e62d0c3ab25bd9b20cc85098ea337d0b1ac5d Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This commit is contained in:
parent
ad5577df06
commit
6ae1c87c75
@ -1154,6 +1154,7 @@ void QXcbConnection::processXcbEvents()
|
||||
xcb_generic_event_t *event = eventqueue->at(i);
|
||||
if (!event)
|
||||
continue;
|
||||
QScopedPointer<xcb_generic_event_t, QScopedPointerPodDeleter> eventGuard(event);
|
||||
(*eventqueue)[i] = 0;
|
||||
|
||||
uint response_type = event->response_type & ~0x80;
|
||||
@ -1204,8 +1205,6 @@ void QXcbConnection::processXcbEvents()
|
||||
handleXcbEvent(event);
|
||||
m_reader->lock();
|
||||
}
|
||||
|
||||
free(event);
|
||||
}
|
||||
|
||||
eventqueue->clear();
|
||||
|
Loading…
Reference in New Issue
Block a user