summaryrefslogtreecommitdiff
path: root/src/lib/ecore_ipc
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@samsung.com>2013-11-28 17:17:09 +0900
committerCedric Bail <cedric.bail@samsung.com>2013-11-28 17:17:09 +0900
commit403e97ecb08392cb7376cef024f4fff480efcff3 (patch)
treeecc3057e3366349a063cc9aad78ea14b5fe7b9c9 /src/lib/ecore_ipc
parentd2c5a37f3778b2c984eaf92b2b8489078143224a (diff)
ecore_ipc: prevent a double free.
According to clang static analyzer it is possible to find a path where buf and svr->buf are pointing to the same array, better be safe than sorry. Arguably this code could be more readable if it was using Eina_Binbuf.
Diffstat (limited to 'src/lib/ecore_ipc')
-rw-r--r--src/lib/ecore_ipc/ecore_ipc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c
index 8b71783f5c..8b9cb2979b 100644
--- a/src/lib/ecore_ipc/ecore_ipc.c
+++ b/src/lib/ecore_ipc/ecore_ipc.c
@@ -1517,7 +1517,7 @@ _ecore_ipc_event_server_data(void *data EINA_UNUSED, int ev_type EINA_UNUSED, vo
1517 else 1517 else
1518 { 1518 {
1519 scroll: 1519 scroll:
1520 if (buf) free(buf); 1520 if (buf != svr->buf) free(buf);
1521 buf = malloc(svr->buf_size - offset); 1521 buf = malloc(svr->buf_size - offset);
1522 if (!buf) 1522 if (!buf)
1523 { 1523 {