Diff between 4b5f85c93896a89a112b139db23ddd97a1bc1654 and b33cb20a2b2fd45654937979d045321a115431f9

Changed Files

File Additions Deletions Status
profiles/input/hog.c +3 -1 modified

Full Patch

diff --git a/profiles/input/hog.c b/profiles/input/hog.c
index 935a920..4dba83f 100644
--- a/profiles/input/hog.c
+++ b/profiles/input/hog.c
@@ -132,8 +132,10 @@ static void hog_device_free(void *data)
 	struct hog_device *dev = data;
 
 	queue_remove(devices, dev);
-	if (queue_isempty(devices))
+	if (queue_isempty(devices)) {
 		queue_destroy(devices, NULL);
+		devices = NULL;
+	}
 
 	btd_device_remove_attio_callback(dev->device, dev->attioid);
 	btd_device_unref(dev->device);