If the device fails PreInit, UnInit is still called by pMse may be NULL. Dereferencing it is a bad idea.
Regression introduced in 9acbedeb887cf8504fd2ca7195b19cff16e8eaf6 Signed-off-by: Peter Hutterer <[email protected]> --- sorry, this escaped my testing before :( src/vmmouse.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vmmouse.c b/src/vmmouse.c index fb053c2..523f4fd 100644 --- a/src/vmmouse.c +++ b/src/vmmouse.c @@ -808,11 +808,13 @@ static void VMMouseUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) { MouseDevPtr pMse = pInfo->private; - VMMousePrivPtr mPriv = (VMMousePrivPtr)pMse->mousePriv; xf86Msg(X_INFO, "VMWARE(0): VMMouseUnInit\n"); - free(mPriv); + if (pMse) { + VMMousePrivPtr mPriv = (VMMousePrivPtr)pMse->mousePriv; + free(mPriv); + } xf86DeleteInput(pInfo, flags); } -- 1.8.1.2 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
