Parent: 02c7e754d77678945ca8140accd94800d64a4ad7
Author: Arman Uguray <armansito@chromium.org>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2014-11-17 11:29:27
Tree: 6ed80dd039bae2d8843d09e3e5f6a7c48f545807
shared/gatt-db: Leave value untouched if realloc fails. gatt_db_attribute_write currently sets the attrib->value pointer to NULL and leaks the old memory block, since realloc leaves the initial block untouched if it fails and returns NULL. This patch fixes this so that the attribute value isn't modified if realloc fails.
Diffstat
| M | src/shared/gatt-db.c | | | 10 | ++++++++- - |
1 files changed, 8 insertions(+), 2 deletions(-)