aboutsummaryrefslogtreecommitdiffstats
path: root/libgamepad_close_device.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-07-27 15:32:10 +0200
committerMattias Andrée <maandree@kth.se>2022-07-27 15:32:10 +0200
commit586ddd6fad5061ea1de4b0fbe903c1c9ea582f72 (patch)
treee34b10acf215a2140df2fd3728300c34825f0734 /libgamepad_close_device.c
parentnames.sh: improve readability (diff)
downloadlibgamepad-586ddd6fad5061ea1de4b0fbe903c1c9ea582f72.tar.gz
libgamepad-586ddd6fad5061ea1de4b0fbe903c1c9ea582f72.tar.bz2
libgamepad-586ddd6fad5061ea1de4b0fbe903c1c9ea582f72.tar.xz
m + add controller fingerprint + relay less on libevdev
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libgamepad_close_device.c')
-rw-r--r--libgamepad_close_device.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libgamepad_close_device.c b/libgamepad_close_device.c
index 3b00149..273c7f8 100644
--- a/libgamepad_close_device.c
+++ b/libgamepad_close_device.c
@@ -11,14 +11,22 @@ libgamepad_close_device(struct libgamepad_device *device)
close(device->fd);
if (device->internals->dev)
libevdev_free(device->internals->dev);
+ free(device->internals->absinfo);
+ free(device->internals->buttons);
free(device->internals);
device->internals = NULL;
}
free(device->buttons);
free(device->absolute_axes);
free(device->relative_axes);
+ free(device->name);
+ free(device->unique_id);
+ free(device->physical_location);
device->buttons = NULL;
device->absolute_axes = NULL;
device->relative_axes = NULL;
+ device->name = NULL;
+ device->unique_id = NULL;
+ device->physical_location = NULL;
}
}