bluetooth: Fail if BlueZ tries to give duplicate device addresses.
authorTanu Kaskinen <tanuk@iki.fi>
Thu, 31 Jan 2013 07:34:55 +0000 (09:34 +0200)
committerTanu Kaskinen <tanuk@iki.fi>
Thu, 31 Jan 2013 07:38:40 +0000 (09:38 +0200)
src/modules/bluetooth/bluetooth-util.c

index d10eb97cb6a35ff5a0b9059769b6be10931b2d77..98e795cce2982fe9bc5b783a50b574717713a1ac 100644 (file)
@@ -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);
             }