diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2006-03-12 19:22:29 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2006-03-12 19:22:29 +0000 |
commit | adb009d7bc98c936cfdb3fad1eec994c94bdaa31 (patch) | |
tree | 01cd54f025c91db639d946fc845cf8674f3664e2 /hcid/security.c | |
parent | ddf636d3df686b0f7b6c6f062b6a8b55d5cd558c (diff) |
More cleanups
Diffstat (limited to 'hcid/security.c')
-rw-r--r-- | hcid/security.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/hcid/security.c b/hcid/security.c index dcda63c5..cff54d9d 100644 --- a/hcid/security.c +++ b/hcid/security.c @@ -89,6 +89,7 @@ static inline int get_bdaddr(int dev, bdaddr_t *sba, uint16_t handle, bdaddr_t * } free(cl); + return -ENOENT; } @@ -237,8 +238,7 @@ static void pin_code_request(int dev, bdaddr_t *sba, bdaddr_t *dba) bacpy(&cr->bdaddr, dba); cr->type = ACL_LINK; if (ioctl(dev, HCIGETCONNINFO, (unsigned long) cr) < 0) { - error("Can't get conn info: %s (%d)", - strerror(errno), errno); + error("Can't get conn info: %s (%d)", strerror(errno), errno); goto reject; } ci = cr->conn_info; @@ -281,12 +281,16 @@ static void pin_code_request(int dev, bdaddr_t *sba, bdaddr_t *dba) /* Let PIN helper handle that */ request_pin(dev, sba, ci); } + free(cr); + return; reject: - hci_send_cmd(dev, OGF_LINK_CTL, OCF_PIN_CODE_NEG_REPLY, 6, dba); free(cr); + + hci_send_cmd(dev, OGF_LINK_CTL, OCF_PIN_CODE_NEG_REPLY, 6, dba); + return; } |