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.
This commit is contained in:
Cedric Bail 2013-11-28 17:17:09 +09:00
parent d2c5a37f37
commit 403e97ecb0
1 changed files with 1 additions and 1 deletions

View File

@ -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)
{