Diff between cad7c666c13b82de9f7a72b63021b21d92244506 and cc3dd149f811ada9eb70a4641af9ebfd06e0b427
Changed Files
| File | Additions | Deletions | Status |
| src/shared/crypto.c | +8 | -2 | modified |
Full Patch
diff --git a/src/shared/crypto.c b/src/shared/crypto.c
index b8eb006..e46f07f 100644
--- a/src/shared/crypto.c
+++ b/src/shared/crypto.c
@@ -284,12 +284,18 @@ bool bt_crypto_sign_att(struct bt_crypto *crypto, const uint8_t key[16],
return false;
len = send(fd, msg, msg_len, 0);
- if (len < 0)
+ if (len < 0) {
+ close(fd);
return false;
+ }
len = read(fd, out, 16);
- if (len < 0)
+ if (len < 0) {
+ close(fd);
return false;
+ }
+
+ close(fd);
/*
* As to BT spec. 4.1 Vol[3], Part C, chapter 10.4.1 sign counter should