diff --git a/src/attrib-server.c b/src/attrib-server.c
index dc05d7e..98bd6b1 100644
--- a/src/attrib-server.c
+++ b/src/attrib-server.c
ATT_ECODE_UNSUPP_GRP_TYPE, pdu, len);
last_handle = end;
- for (l = database, groups = NULL; l; l = l->next) {
+ for (l = database, groups = NULL, cur = NULL; l; l = l->next) {
struct attribute *client_attr;
a = l->data;
} else if (last_type == BT_UUID128) {
length = 16;
format = 0x02;
+ } else {
+ g_slist_free(info);
+ return 0;
}
adl = att_data_list_alloc(num, length + 2);