---
name: "input_free_device"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/input_free_device"
---

# input\_free\_device(9)

free memory occupied by input\_dev structure

## NAME

input\_free\_device - free memory occupied by input\_dev structure

## SYNOPSIS

**void input\_free\_device(struct input\_dev \*** *dev***);**

## ARGUMENTS

*dev*

input device to free

## DESCRIPTION

This function should only be used if **input\_register\_device** was not called yet or if it failed. Once device was registered use **input\_unregister\_device** and memory will be freed once last reference to the device is dropped.

Device should be allocated by **input\_allocate\_device**.

## NOTE

If there are references to the input device then memory will not be freed until last reference is dropped.

## COPYRIGHT
