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:
a10e966
)
elm_index: Fix memory leak issue in realloc failure
author
Vivek Ellur
<vivek.ellur@samsung.com>
Thu, 22 Oct 2015 19:38:28 +0000
(12:38 -0700)
committer
Cedric BAIL
<cedric@osg.samsung.com>
Thu, 22 Oct 2015 19:40:19 +0000
(12:40 -0700)
Summary:
@Fix
Signed-off-by: Vivek Ellur <vivek.ellur@samsung.com>
Reviewers: cedric
Differential Revision: https://phab.enlightenment.org/D3214
src/lib/elm_index.c
patch
|
blob
|
history
diff --git
a/src/lib/elm_index.c
b/src/lib/elm_index.c
index
83194a7
..
7f3cb39
100644
(file)
--- a/
src/lib/elm_index.c
+++ b/
src/lib/elm_index.c
@@
-770,14
+770,17
@@
_sel_eval(Evas_Object *obj,
{
if (label && last)
{
- label = realloc(label, strlen(label) +
+ char *temp;
+
+ temp = realloc(label, strlen(label) +
strlen(last) + 1);
- if (!
label
)
+ if (!
temp
)
{
+ free(label);
free(last);
return;
}
-
strcat(label
, last);
+
label = strcat(temp
, last);
}
}
free(last);