mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-24 13:40:06 +01:00
dix: fix memory leak in TouchEventHistoryReplay
Don't leak if ti->history is NULL.
Found by coverity.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit a9c09f8f8e)
This commit is contained in:
parent
c4d28c40bf
commit
eca5de2f1a
1 changed files with 5 additions and 2 deletions
|
|
@ -460,14 +460,17 @@ TouchEventHistoryPush(TouchPointInfoPtr ti, const DeviceEvent *ev)
|
|||
void
|
||||
TouchEventHistoryReplay(TouchPointInfoPtr ti, DeviceIntPtr dev, XID resource)
|
||||
{
|
||||
InternalEvent *tel = InitEventList(GetMaximumEventsNum());
|
||||
ValuatorMask *mask = valuator_mask_new(0);
|
||||
InternalEvent *tel;
|
||||
ValuatorMask *mask;
|
||||
int i, nev;
|
||||
int flags;
|
||||
|
||||
if (!ti->history)
|
||||
return;
|
||||
|
||||
tel = InitEventList(GetMaximumEventsNum());
|
||||
mask = valuator_mask_new(0);
|
||||
|
||||
valuator_mask_set_double(mask, 0, ti->history[0].valuators.data[0]);
|
||||
valuator_mask_set_double(mask, 1, ti->history[0].valuators.data[1]);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue