summaryrefslogtreecommitdiff
path: root/src/lib/ecore_ipc
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-07-09 12:18:37 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-07-09 12:18:37 +0900
commitfad576295ed101c746dfdf57d1fe551cdb1d4dd5 (patch)
tree01f0a625f61b159054895aaf048664714eb67cb1 /src/lib/ecore_ipc
parentf54a09ef83737d331ca6734c2eb499422080be7f (diff)
somehow buf is freed once its put into an event.. but before event is
processed. don't allow this.
Diffstat (limited to 'src/lib/ecore_ipc')
-rw-r--r--src/lib/ecore_ipc/ecore_ipc.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c
index 9b0efc3a88..5dfb636f67 100644
--- a/src/lib/ecore_ipc/ecore_ipc.c
+++ b/src/lib/ecore_ipc/ecore_ipc.c
@@ -1492,6 +1492,12 @@ _ecore_ipc_event_server_data(void *data EINA_UNUSED, int ev_type EINA_UNUSED, vo
1492 e2->response = msg.response; 1492 e2->response = msg.response;
1493 e2->size = msg.size; 1493 e2->size = msg.size;
1494 e2->data = buf; 1494 e2->data = buf;
1495 if (buf == svr->buf)
1496 {
1497 svr->buf = NULL;
1498 svr->buf_size = 0;
1499 }
1500 buf = NULL;
1495 ecore_event_add(ECORE_IPC_EVENT_SERVER_DATA, e2, 1501 ecore_event_add(ECORE_IPC_EVENT_SERVER_DATA, e2,
1496 _ecore_ipc_event_server_data_free, 1502 _ecore_ipc_event_server_data_free,
1497 NULL); 1503 NULL);
@@ -1500,9 +1506,9 @@ _ecore_ipc_event_server_data(void *data EINA_UNUSED, int ev_type EINA_UNUSED, vo
1500 } 1506 }
1501 svr->prev.i = msg; 1507 svr->prev.i = msg;
1502 offset += (s + msg.size); 1508 offset += (s + msg.size);
1503 if (svr->buf_size == offset) 1509 if ((svr->buf_size == offset) && ((svr->buf) || (buf)))
1504 { 1510 {
1505 free(svr->buf); 1511 if (svr->buf) free(svr->buf);
1506 svr->buf = NULL; 1512 svr->buf = NULL;
1507 svr->buf_size = 0; 1513 svr->buf_size = 0;
1508 if (buf) free(buf); 1514 if (buf) free(buf);