Fix the svace issue
[platform/core/connectivity/bluetooth-frwk.git] / 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);