summaryrefslogtreecommitdiff
path: root/peripheral
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2015-05-15 17:17:01 +0300
committerJohan Hedberg <johan.hedberg@intel.com>2015-05-17 10:39:00 +0300
commitcf8c7401a0caa237824c2adcdfb428b304a9984e (patch)
tree3c8f5bedb054598870cbd52ece427ac86e39292e /peripheral
parentb5093e5688c4f3c3c74b9e37ae2cf448f1c56b46 (diff)
downloadbluez-cf8c7401a0caa237824c2adcdfb428b304a9984e.tar.gz
gatt: Fix NULL pointer dereference
Safely return in case of error.
Diffstat (limited to 'peripheral')
-rw-r--r--peripheral/gatt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/peripheral/gatt.c b/peripheral/gatt.c
index 8df62a6e6..6cf2b79ac 100644
--- a/peripheral/gatt.c
+++ b/peripheral/gatt.c
@@ -178,6 +178,7 @@ static void att_conn_callback(int fd, uint32_t events, void *user_data)
if (!conn) {
fprintf(stderr, "Failed to create GATT connection\n");
close(new_fd);
+ return;
}
if (!queue_push_tail(conn_list, conn)) {