Diff between 8b61564c4db28976bf9cd2ca4ee89bbffc03e5ab and 8c8cc51b1866b250db9add8375413c232fda973b
Changed Files
| File | Additions | Deletions | Status |
| attrib/gatt.c | +3 | -1 | modified |
Full Patch
diff --git a/attrib/gatt.c b/attrib/gatt.c
index c1aa070..38d455a 100644
--- a/attrib/gatt.c
+++ b/attrib/gatt.c
@@ -651,8 +651,10 @@ static void read_char_helper(guint8 status, const guint8 *rpdu,
goto done;
long_read->buffer = g_malloc(rlen);
- if (long_read->buffer == NULL)
+ if (long_read->buffer == NULL) {
+ status = ATT_ECODE_INSUFF_RESOURCES;
goto done;
+ }
memcpy(long_read->buffer, rpdu, rlen);
long_read->size = rlen;