cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=403e97ecb08392cb7376cef024f4fff480efcff3
commit 403e97ecb08392cb7376cef024f4fff480efcff3 Author: Cedric Bail <cedric.b...@samsung.com> Date: Thu Nov 28 17:17:09 2013 +0900 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. --- src/lib/ecore_ipc/ecore_ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c index 8b71783..8b9cb29 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 else { scroll: - if (buf) free(buf); + if (buf != svr->buf) free(buf); buf = malloc(svr->buf_size - offset); if (!buf) { --