Author: Reinhard Tartler Subject: Fix segfault when called with a null pointer Index: libxi-1.6.1/src/XIQueryDevice.c =================================================================== --- libxi-1.6.1.orig/src/XIQueryDevice.c 2011-12-20 01:28:44.000000000 +0100 +++ libxi-1.6.1/src/XIQueryDevice.c 2012-12-11 13:16:33.328167000 +0100 @@ -114,6 +114,10 @@ XIFreeDeviceInfo(XIDeviceInfo* info) { XIDeviceInfo *ptr = info; + + if (!ptr) + return; + while(ptr->name) { Xfree(ptr->classes);