diff --git a/android/hog.c b/android/hog.c
index edee73f..b87fd2f 100644
--- a/android/hog.c
+++ b/android/hog.c
#include "lib/uuid.h"
#include "src/shared/util.h"
#include "src/shared/uhid.h"
+#include "src/shared/queue.h"
#include "attrib/att.h"
#include "attrib/gattrib.h"
struct bt_dis *dis;
struct bt_bas *bas;
GSList *instances;
+ struct queue *gatt_op;
};
struct report {
g_slist_free_full(hog->reports, report_free);
g_free(hog->name);
g_free(hog->primary);
+ queue_destroy(hog->gatt_op, NULL);
g_free(hog);
}
if (!hog)
return NULL;
+ hog->gatt_op = queue_new();
+ if (!hog->gatt_op) {
+ hog_free(hog);
+ return NULL;
+ }
+
hog->uhid = bt_uhid_new_default();
if (!hog->uhid) {
hog_free(hog);
+ queue_destroy(hog->gatt_op, NULL);
return NULL;
}