forked from enlightenment/efl
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:
parent
d2c5a37f37
commit
403e97ecb0
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue