summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/examples/ecore/ecore_con_server_http_example.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/examples/ecore/ecore_con_server_http_example.c b/src/examples/ecore/ecore_con_server_http_example.c
index 1269b73536..b0dfc6310e 100644
--- a/src/examples/ecore/ecore_con_server_http_example.c
+++ b/src/examples/ecore/ecore_con_server_http_example.c
@@ -58,13 +58,14 @@ _del(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_Con_Event_Client_Del *e
58 client = ecore_con_client_data_get(ev->client); 58 client = ecore_con_client_data_get(ev->client);
59 59
60 printf("Lost client with ip %s!\n", ecore_con_client_ip_get(ev->client)); 60 printf("Lost client with ip %s!\n", ecore_con_client_ip_get(ev->client));
61 printf("Total data received from this client: %d\n", client->sdata); 61 if (client)
62 {
63 printf("Total data received from this client: %d\n", client->sdata);
64 free(client);
65 }
62 printf("Client was connected for %0.3f seconds.\n", 66 printf("Client was connected for %0.3f seconds.\n",
63 ecore_con_client_uptime_get(ev->client)); 67 ecore_con_client_uptime_get(ev->client));
64 68
65 if (client)
66 free(client);
67
68 ecore_con_client_del(ev->client); 69 ecore_con_client_del(ev->client);
69 70
70 return ECORE_CALLBACK_RENEW; 71 return ECORE_CALLBACK_RENEW;