From 849161f0865d5a264de3b0073112bb3238e7022c Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Thu, 31 Jan 2013 09:34:55 +0200 Subject: [PATCH] bluetooth: Fail if BlueZ tries to give duplicate device addresses. --- src/modules/bluetooth/bluetooth-util.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/bluetooth/bluetooth-util.c b/src/modules/bluetooth/bluetooth-util.c index d10eb97cb..98e795cce 100644 --- a/src/modules/bluetooth/bluetooth-util.c +++ b/src/modules/bluetooth/bluetooth-util.c @@ -372,7 +372,11 @@ static int parse_device_property(pa_bluetooth_device *d, DBusMessageIter *i, boo return -1; } - pa_xfree(d->address); + if (d->address) { + pa_log("Device %s: Received a duplicate Address property.", d->path); + return -1; + } + d->address = pa_xstrdup(value); }