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:
ecc445b
)
Eo callbacks: Fix a possible issue of corrupted callback list.
author
Tom Hacohen
<tom@stosb.com>
Mon, 30 Sep 2013 13:16:46 +0000
(14:16 +0100)
committer
Tom Hacohen
<tom@stosb.com>
Fri, 16 May 2014 13:33:36 +0000
(14:33 +0100)
This happens when we delete more than one callback at the beginning
of the list (i.e 2 or more) in one go.
src/lib/eo/eo_base_class.c
patch
|
blob
|
history
diff --git
a/src/lib/eo/eo_base_class.c
b/src/lib/eo/eo_base_class.c
index
0419296
..
f8eb1ff
100644
(file)
--- a/
src/lib/eo/eo_base_class.c
+++ b/
src/lib/eo/eo_base_class.c
@@
-433,8
+433,6
@@
_eo_callback_remove(Private_Data *pd, Eo_Callback_Description *cb)
Eo_Callback_Description *itr, *pitr = NULL;
itr = pd->callbacks;
- if (pd->callbacks == cb)
- pd->callbacks = cb->next;
for ( ; itr; )
{
@@
-447,6
+445,10
@@
_eo_callback_remove(Private_Data *pd, Eo_Callback_Description *cb)
{
pitr->next = titr->next;
}
+ else
+ {
+ pd->callbacks = titr->next;
+ }
free(titr);
}
else