Fix the svace issue 47/177147/2 accepted/tizen/unified/20180427.062420 submit/tizen/20180426.103200
authorHyuk Lee <hyuk0512.lee@samsung.com>
Thu, 26 Apr 2018 01:18:34 +0000 (10:18 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 26 Apr 2018 10:15:38 +0000 (19:15 +0900)
Change-Id: I196e12ddc9ad87007464221d21b7888b69e41180
Signed-off-by: Hyuk Lee <hyuk0512.lee@samsung.com>
bt-oal/bluez_hal/src/bt-hal-event-receiver.c

index 08acca2..8b8604e 100644 (file)
@@ -751,6 +751,14 @@ static void __bt_hal_handle_property_changed_event(GVariant *msg, const char *ob
 
        g_variant_get(msg, "(&s@a{sv}@as)", &interface_name, &val, NULL);
 
+       if (!interface_name) {
+               DBG("Failed to get interface name");
+
+               if (val)
+                       g_variant_unref(val);
+               return;
+       }
+
        if (strcasecmp(interface_name, BT_HAL_ADAPTER_INTERFACE) == 0) {
                DBG("Event: Property Changed: Interface: BT_HAL_ADAPTER_INTERFACE");
                __bt_hal_adapter_property_changed_event(val);