Re: [PATCH xts] XI/ChangePointerDevice: Fix double-free

2013-06-11 Thread Peter Hutterer
On Mon, Jun 10, 2013 at 12:37:24PM -0400, Peter Harris wrote: XCloseDevice frees the device parameter, even if it references an invalid device. Therefore, the device parameter must have been malloc'd. Signed-off-by: Peter Harris phar...@opentext.com --- xts5/XI/ChangePointerDevice.m |6

Re: [PATCH xts] XI/ChangePointerDevice: Fix double-free

2013-06-11 Thread Peter Harris
On 2013-06-11 05:25, Peter Hutterer wrote: this just doesn't look right, it's a bit confusing. bogus is only used for the deviceid and only a problem for XCloseDevice, so you should be able to move the device = bogus call down past XCloseDevice(). that closes the already open device and then

[PATCH xts] XI/ChangePointerDevice: Fix double-free

2013-06-10 Thread Peter Harris
XCloseDevice frees the device parameter, even if it references an invalid device. Therefore, the device parameter must have been malloc'd. Signed-off-by: Peter Harris phar...@opentext.com --- xts5/XI/ChangePointerDevice.m |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git