summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-10-08 10:07:03 +0200
committerJohan Hedberg <johan.hedberg@nokia.com>2008-10-08 10:07:03 +0200
commit4a663d114edeab8ca7cc567ca9150cd0e45a47cb (patch)
tree95a1b4e8af7cae1aeb369953f02a1b3d77d33a90
parent8969f1e9835521d0efc67588730279532e4b567c (diff)
Fix use of uninitialized address variable
-rw-r--r--audio/control.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/audio/control.c b/audio/control.c
index d455e33d..2b37fd3f 100644
--- a/audio/control.c
+++ b/audio/control.c
@@ -745,6 +745,8 @@ static void avctp_connect_cb(GIOChannel *chan, int err, const bdaddr_t *src,
int sk;
char address[18];
+ ba2str(&session->dst, address);
+
if (err < 0) {
avctp_unref(session);
error("AVCTP connect(%s): %s (%d)", address, strerror(-err),
@@ -752,7 +754,6 @@ static void avctp_connect_cb(GIOChannel *chan, int err, const bdaddr_t *src,
return;
}
- ba2str(&session->dst, address);
debug("AVCTP: connected to %s", address);
g_io_channel_set_close_on_unref(chan, FALSE);