FreeInputAttributes(pInp->attrs);
+ if (pInp->flags & XI86_SERVER_FD) {
+ systemd_logind_release_fd(pInp->major, pInp->minor);
+ close(pInp->fd);
+ }
+
/* Remove the entry from the list. */
if (pInp == xf86InputDevs)
xf86InputDevs = pInp->next;
/* Else the entry wasn't in the xf86InputDevs list (ignore this). */
}
- if (pInp->flags & XI86_SERVER_FD) {
- systemd_logind_release_fd(pInp->major, pInp->minor);
- close(pInp->fd);
- }
-
free((void *) pInp->driver);
free((void *) pInp->name);
xf86optionListFree(pInp->options);