From 518b658a7e6d412cffd2eda2eada64bdea384e30 Mon Sep 17 00:00:00 2001 From: Arman Uguray Date: Tue, 3 Mar 2015 14:50:57 -0800 Subject: [PATCH] core/gatt: Fix not initializing pending_writes This patch fixes a bug where the pending_writes list for an external characteristic was never being initialized. --- src/gatt-database.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gatt-database.c b/src/gatt-database.c index 153c80d9a..fa10ce83b 100644 --- a/src/gatt-database.c +++ b/src/gatt-database.c @@ -916,6 +916,13 @@ static struct external_chrc *chrc_create(GDBusProxy *proxy) return NULL; } + chrc->pending_writes = queue_new(); + if (!chrc->pending_writes) { + queue_destroy(chrc->pending_reads, NULL); + free(chrc); + return NULL; + } + chrc->proxy = g_dbus_proxy_ref(proxy); return chrc; -- 2.47.3