summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-06-11 08:45:46 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2008-06-11 08:45:46 +0000
commitb05a997e2744579ca0cb141526285b5d9dee9321 (patch)
tree3f4453fcfd8096966b6232d317d3948a670ce1d2 /hcid
parent24e72e94d27fad0b92e3fcf42f0c66b88cb1b495 (diff)
Fix use of uninitialized memory when getting local name fails
Diffstat (limited to 'hcid')
-rw-r--r--hcid/dbus-hci.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hcid/dbus-hci.c b/hcid/dbus-hci.c
index d0b6b59c..6e4b897e 100644
--- a/hcid/dbus-hci.c
+++ b/hcid/dbus-hci.c
@@ -2278,9 +2278,7 @@ void hcid_dbus_setname_complete(bdaddr_t *local)
error("Sending getting name command failed: %s (%d)",
strerror(errno), errno);
rp.name[0] = '\0';
- }
-
- if (rp.status) {
+ } else if (rp.status) {
error("Getting name failed with status 0x%02x",
rp.status);
rp.name[0] = '\0';