projects
/
platform
/
upstream
/
efl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d2c5a37
)
ecore_ipc: prevent a double free.
author
Cedric Bail
<cedric.bail@samsung.com>
Thu, 28 Nov 2013 08:17:09 +0000
(17:17 +0900)
committer
Cedric Bail
<cedric.bail@samsung.com>
Thu, 28 Nov 2013 08:17:09 +0000
(17:17 +0900)
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
patch
|
blob
|
history
diff --git
a/src/lib/ecore_ipc/ecore_ipc.c
b/src/lib/ecore_ipc/ecore_ipc.c
index
8b71783
..
8b9cb29
100644
(file)
--- 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)
{