diff options
author | Anderson Lizardo <anderson.lizardo@openbossa.org> | 2013-04-02 11:07:43 -0400 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2013-04-04 14:50:59 +0300 |
commit | 03f2256f6a0b43c2221812a248614653ec333f0c (patch) | |
tree | d3a1261efca9cde84cee198b27159b67efb74bc1 /attrib | |
parent | e39bad17d19e417342431c366dac766613b9c7d6 (diff) | |
download | bluez-03f2256f6a0b43c2221812a248614653ec333f0c.tar.gz |
attrib: Fix memory leak on low memory condition
If g_try_new0() fails due to low memory condition, "list" should be
freed before returning from primary_all_cb().
Diffstat (limited to 'attrib')
-rw-r--r-- | attrib/gatt.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/attrib/gatt.c b/attrib/gatt.c index 44d3eb651..e4c538503 100644 --- a/attrib/gatt.c +++ b/attrib/gatt.c @@ -226,6 +226,7 @@ static void primary_all_cb(guint8 status, const guint8 *ipdu, guint16 iplen, primary = g_try_new0(struct gatt_primary, 1); if (!primary) { + att_data_list_free(list); err = ATT_ECODE_INSUFF_RESOURCES; goto done; } |