Diff between 40798ee2cf490d054a5b80ff57b5f1047de0e4eb and a148b6bbf93056a186b539f4351d2cf125b57002
Changed Files
| File | Additions | Deletions | Status |
| src/shared/gatt-db.c | +4 | -0 | modified |
Full Patch
diff --git a/src/shared/gatt-db.c b/src/shared/gatt-db.c
index d9f63be..36316af 100644
--- a/src/shared/gatt-db.c
+++ b/src/shared/gatt-db.c
@@ -99,6 +99,10 @@ static void attribute_destroy(void *data)
{
struct gatt_db_attribute *attribute = data;
+ /* Attribute was not initialized by user */
+ if (!attribute)
+ return;
+
free(attribute->value);
free(attribute);
}