summaryrefslogtreecommitdiff
path: root/src/lib/ecore_con
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-07-24 17:44:22 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-07-24 17:44:22 +0900
commitfd9e6b305d6f873aad241e5700d253d4ea0736e2 (patch)
tree60d31237520987fa1f1339cc3143f175434a2733 /src/lib/ecore_con
parent143709faba6c508a5d15c7d593bd67a18be3d446 (diff)
efl net server udp - report erro on alloc failure
unwind nicely and complain
Diffstat (limited to 'src/lib/ecore_con')
-rw-r--r--src/lib/ecore_con/efl_net_server_udp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/ecore_con/efl_net_server_udp.c b/src/lib/ecore_con/efl_net_server_udp.c
index b83f5826b0..cd68271f95 100644
--- a/src/lib/ecore_con/efl_net_server_udp.c
+++ b/src/lib/ecore_con/efl_net_server_udp.c
@@ -340,6 +340,15 @@ _efl_net_server_udp_efl_net_server_fd_process_incoming_data(Eo *o, Efl_Net_Serve
340 { 340 {
341 void *tmp = realloc(buf, r); 341 void *tmp = realloc(buf, r);
342 if (tmp) buf = tmp; 342 if (tmp) buf = tmp;
343 else
344 {
345 Eina_Error err = efl_net_socket_error_get();
346
347 free(buf);
348 ERR("Out of memory on efl net udp data incoming");
349 efl_event_callback_call(o, EFL_NET_SERVER_EVENT_ERROR, &err);
350 return;
351 }
343 } 352 }
344 slice = (Eina_Rw_Slice){.mem = buf, .len = r }; 353 slice = (Eina_Rw_Slice){.mem = buf, .len = r };
345 354