diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2015-05-15 17:17:01 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2015-05-17 10:39:00 +0300 |
commit | cf8c7401a0caa237824c2adcdfb428b304a9984e (patch) | |
tree | 3c8f5bedb054598870cbd52ece427ac86e39292e /peripheral/gatt.c | |
parent | b5093e5688c4f3c3c74b9e37ae2cf448f1c56b46 (diff) | |
download | bluez-cf8c7401a0caa237824c2adcdfb428b304a9984e.tar.gz |
gatt: Fix NULL pointer dereference
Safely return in case of error.
Diffstat (limited to 'peripheral/gatt.c')
-rw-r--r-- | peripheral/gatt.c | 1 |
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)) { |