diff options
author | Santiago Carot-Nemesio <sancane@gmail.com> | 2012-02-07 14:26:44 +0100 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-02-09 12:44:24 +0200 |
commit | 6b12cbb3c703f901343481b3089eac5780ddbc61 (patch) | |
tree | 6902f6bd3ac8c6e7b0a9eaf3de9480cc2993236e /src | |
parent | e4ffa59dc79a99e9311237092e4137cb8f8ea990 (diff) | |
download | bluez-6b12cbb3c703f901343481b3089eac5780ddbc61.tar.gz |
attrib-server: Fix memory leak attaching attribute channels
Channel is not being released when the channel is attached over
an uninitialized GATT server.
Diffstat (limited to 'src')
-rw-r--r-- | src/attrib-server.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/attrib-server.c b/src/attrib-server.c index 299516723..e51f695aa 100644 --- a/src/attrib-server.c +++ b/src/attrib-server.c @@ -1020,8 +1020,14 @@ guint attrib_channel_attach(GAttrib *attrib, gboolean out) } server = find_gatt_server(&channel->src); - if (server == NULL) + if (server == NULL) { + char src[18]; + + ba2str(&channel->src, src); + error("No GATT server found in %s", src); + g_free(channel); return 0; + } channel->server = server; |