projects
/
platform
/
upstream
/
elementary.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c530b6
)
elm_index: Also free last on error path.
author
Stefan Schmidt
<s.schmidt@samsung.com>
Tue, 17 Jun 2014 09:12:04 +0000
(11:12 +0200)
committer
Stefan Schmidt
<s.schmidt@samsung.com>
Tue, 17 Jun 2014 09:12:04 +0000
(11:12 +0200)
If we can't realloc label we need to free last before we can return
or we leak it.
CID: 1193240
src/lib/elm_index.c
patch
|
blob
|
history
diff --git
a/src/lib/elm_index.c
b/src/lib/elm_index.c
index
62c2cc1
..
cf66fe0
100644
(file)
--- a/
src/lib/elm_index.c
+++ b/
src/lib/elm_index.c
@@
-652,7
+652,11
@@
_sel_eval(Evas_Object *obj,
{
label = realloc(label, strlen(label) +
strlen(last) + 1);
- if (!label) return;
+ if (!label)
+ {
+ free(last);
+ return;
+ }
strcat(label, last);
}
}