Fixed the NULL pointer dereferencing 61/244561/1
authorPrasadam Prashath Kumar <prasadam.p@samsung.com>
Mon, 21 Sep 2020 18:43:34 +0000 (00:13 +0530)
committerPrasadam Prashath Kumar <prasadam.p@samsung.com>
Mon, 21 Sep 2020 18:54:47 +0000 (00:24 +0530)
segmentatin fault while gtest build
qemu: uncaught target signal 11 (Segmentation fault) - core dumped

Change-Id: Iee747c7ed11fa8474e155187314070391e30b077
Signed-off-by: Prasadam Prashath Kumar <prasadam.p@samsung.com>
unittest/mock/connection-mock.c

index 08f9bba9a59dc792c17b7e5c11499f71cac2b3af..02fc8c74e87cdee9f1ce7dda3a1e99e83e1c5586 100755 (executable)
@@ -286,6 +286,13 @@ API int net_get_wifi_state(void *handle, net_wifi_state_t *current_state)
        return NET_ERR_NONE;
 }
 
+API int net_get_wifi_interface_list(void *handle, GSList **interface_list)
+{
+       *interface_list = g_slist_append(*interface_list,
+               g_strdup("dummy_ifname"));
+       return NET_ERR_NONE;
+}
+
 static void __net_init_profile_info(net_device_t profile_type, net_profile_info_t *ProfInfo)
 {
        int i = 0;
@@ -931,4 +938,4 @@ API int net_mptcp_get_scheduler(void *handle, char **scheduler)
 {
        *scheduler = g_strdup("default");
        return NET_ERR_NONE;
-}
\ No newline at end of file
+}