diff --git a/src/shared/gatt-db.c b/src/shared/gatt-db.c
index eac7948..9a9cadc 100644
--- a/src/shared/gatt-db.c
+++ b/src/shared/gatt-db.c
return true;
}
+
+bool gatt_db_attribute_reset(struct gatt_db_attribute *attrib)
+{
+ if (!attrib)
+ return false;
+
+ if (!attrib->value || !attrib->value_len)
+ return true;
+
+ free(attrib->value);
+ attrib->value = NULL;
+ attrib->value_len = 0;
+
+ return true;
+}
diff --git a/src/shared/gatt-db.h b/src/shared/gatt-db.h
index 2edd13f..1f4005e 100644
--- a/src/shared/gatt-db.h
+++ b/src/shared/gatt-db.h
bool gatt_db_attribute_write_result(struct gatt_db_attribute *attrib,
unsigned int id, int err);
+
+bool gatt_db_attribute_reset(struct gatt_db_attribute *attrib);