xi: free modifiers_failed on error path. (v2)
Pointed out by coverity.
v2: set modifies_failed to NULL at start (whot)
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 51ae6126dc
)
This commit is contained in:
parent
bdeab7863e
commit
26a83f9833
|
@ -88,7 +88,7 @@ ProcXIPassiveGrabDevice(ClientPtr client)
|
|||
};
|
||||
int i, ret = Success;
|
||||
uint32_t *modifiers;
|
||||
xXIGrabModifierInfo *modifiers_failed;
|
||||
xXIGrabModifierInfo *modifiers_failed = NULL;
|
||||
GrabMask mask = { 0 };
|
||||
GrabParameters param;
|
||||
void *tmp;
|
||||
|
@ -232,8 +232,8 @@ ProcXIPassiveGrabDevice(ClientPtr client)
|
|||
if (rep.num_modifiers)
|
||||
WriteToClient(client, rep.length * 4, modifiers_failed);
|
||||
|
||||
free(modifiers_failed);
|
||||
out:
|
||||
free(modifiers_failed);
|
||||
xi2mask_free(&mask.xi2mask);
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user