Commit a9c09f8f authored by Peter Hutterer's avatar Peter Hutterer
Browse files

dix: fix memory leak in TouchEventHistoryReplay



Don't leak if ti->history is NULL.

Found by coverity.
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
parent 55ff20eb
......@@ -463,14 +463,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]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment