summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2016-04-05 10:32:25 +0300
committerDaniel Zaoui <daniel.zaoui@samsung.com>2016-04-10 15:15:08 +0300
commit49f0f09661cf11dc5c61291502a33fd027abd9b1 (patch)
tree16b3dfc224438b08159c52801611bb0490e0f41e
parentca346eb2731aca1037f96943c930c8dab73a1cbd (diff)
Ecore_Con: protect access to internal data
-rw-r--r--src/lib/ecore_con/ecore_con.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/lib/ecore_con/ecore_con.c b/src/lib/ecore_con/ecore_con.c
index 4bca0437e5..39edeb154c 100644
--- a/src/lib/ecore_con/ecore_con.c
+++ b/src/lib/ecore_con/ecore_con.c
@@ -1407,8 +1407,11 @@ _efl_network_client_eo_base_destructor(Eo *obj, Efl_Network_Client_Data *cl)
1407 } 1407 }
1408 Efl_Network_Server_Data *host_server = eo_data_scope_get(cl->host_server, EFL_NETWORK_SERVER_CLASS); 1408 Efl_Network_Server_Data *host_server = eo_data_scope_get(cl->host_server, EFL_NETWORK_SERVER_CLASS);
1409 1409
1410 host_server->clients = eina_list_remove(host_server->clients, obj); 1410 if (host_server)
1411 --host_server->client_count; 1411 {
1412 host_server->clients = eina_list_remove(host_server->clients, obj);
1413 --host_server->client_count;
1414 }
1412 1415
1413#ifdef _WIN32 1416#ifdef _WIN32
1414 ecore_con_local_win32_client_del(obj); 1417 ecore_con_local_win32_client_del(obj);
@@ -1418,7 +1421,7 @@ _efl_network_client_eo_base_destructor(Eo *obj, Efl_Network_Client_Data *cl)
1418 1421
1419 if (cl->buf) eina_binbuf_free(cl->buf); 1422 if (cl->buf) eina_binbuf_free(cl->buf);
1420 1423
1421 if (host_server->type & ECORE_CON_SSL) 1424 if (host_server && (host_server->type & ECORE_CON_SSL))
1422 ecore_con_ssl_client_shutdown(obj); 1425 ecore_con_ssl_client_shutdown(obj);
1423 1426
1424 if (cl->fd_handler) 1427 if (cl->fd_handler)
@@ -1517,7 +1520,7 @@ _ecore_con_cl_timer_update(Ecore_Con_Client *obj)
1517 { 1520 {
1518 Efl_Network_Server_Data *host_server = eo_data_scope_get(cl->host_server, EFL_NETWORK_SERVER_CLASS); 1521 Efl_Network_Server_Data *host_server = eo_data_scope_get(cl->host_server, EFL_NETWORK_SERVER_CLASS);
1519 1522
1520 if (host_server->client_disconnect_time > 0) 1523 if (host_server && host_server->client_disconnect_time > 0)
1521 { 1524 {
1522 if (cl->until_deletion) 1525 if (cl->until_deletion)
1523 { 1526 {