Author: gonzo Date: Fri Sep 23 18:54:08 2016 New Revision: 306274 URL: https://svnweb.freebsd.org/changeset/base/306274
Log: Handle NULL argument in evdev_free Add check for evdev argument of evdev_free being NULL. This is valid value and should not cause crash. In this case evdev_free does nothing Submitted by: Vladimir Kondratiev <w...@cicgroup.ru> Modified: head/sys/dev/evdev/evdev.c Modified: head/sys/dev/evdev/evdev.c ============================================================================== --- head/sys/dev/evdev/evdev.c Fri Sep 23 17:24:06 2016 (r306273) +++ head/sys/dev/evdev/evdev.c Fri Sep 23 18:54:08 2016 (r306274) @@ -92,7 +92,8 @@ void evdev_free(struct evdev_dev *evdev) { - if (evdev->ev_cdev != NULL && evdev->ev_cdev->si_drv1 != NULL) + if (evdev != NULL && evdev->ev_cdev != NULL && + evdev->ev_cdev->si_drv1 != NULL) evdev_unregister(evdev); free(evdev, M_EVDEV); _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"