xi: fix memory leak in ProcXIQueryDevice
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
dce2f10cf7
commit
623bb34342
|
@ -107,8 +107,10 @@ ProcXIQueryDevice(ClientPtr client)
|
||||||
}
|
}
|
||||||
|
|
||||||
info = calloc(1, len);
|
info = calloc(1, len);
|
||||||
if (!info)
|
if (!info) {
|
||||||
|
free(skip);
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
|
}
|
||||||
|
|
||||||
memset(&rep, 0, sizeof(xXIQueryDeviceReply));
|
memset(&rep, 0, sizeof(xXIQueryDeviceReply));
|
||||||
rep.repType = X_Reply;
|
rep.repType = X_Reply;
|
||||||
|
|
Loading…
Reference in New Issue