[pulseaudio-commits] src/modules

Tanu Kaskinen tanuk at kemper.freedesktop.org
Wed Jun 19 08:26:46 PDT 2013


 src/modules/bluetooth/module-bluetooth-device.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit e05c12f28b4bc8e4d7c5ba47f4bdb51243f9f252
Author: Tanu Kaskinen <tanu.kaskinen at linux.intel.com>
Date:   Wed Jun 5 17:45:06 2013 +0300

    bluetooth: Fix too late assertion
    
    u was dereferenced before the assertion that checks that u isn't NULL.

diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c
index f82033a..a517e59 100644
--- a/src/modules/bluetooth/module-bluetooth-device.c
+++ b/src/modules/bluetooth/module-bluetooth-device.c
@@ -2233,11 +2233,13 @@ static int add_card(struct userdata *u) {
     pa_bt_form_factor_t ff;
     char *n;
     const char *default_profile;
-    const pa_bluetooth_device *device = u->device;
+    const pa_bluetooth_device *device;
     const pa_bluetooth_uuid *uuid;
 
     pa_assert(u);
-    pa_assert(device);
+    pa_assert(u->device);
+
+    device = u->device;
 
     pa_card_new_data_init(&data);
     data.driver = __FILE__;



More information about the pulseaudio-commits mailing list