Added NULL pointer guard check before g_ascii_strcasecmp.
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / bt-service-network.c
index 00140da..bd065b2 100644 (file)
@@ -100,7 +100,10 @@ static connection_profile_h __bt_get_net_profile(void *connection,
                        if (g_strv_length(split_string) < 3)
                                continue;
 
-                       if (g_ascii_strcasecmp(split_string[2], net_address) == 0) {
+                       if (split_string[2] == NULL) {
+                               BT_ERR("__bt_get_net_profile Error Parameter are NULL..\n");
+                               continue;
+                       } else if (g_ascii_strcasecmp(split_string[2], net_address) == 0) {
                                BT_DBG("matched profile");
                                g_strfreev(split_string);
                                return profile_h;