aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/edje/edje_util.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-11-13 14:12:42 -0800
committerCedric BAIL <cedric@osg.samsung.com>2017-11-13 14:12:42 -0800
commit7c615e183110f26bf6ea1671848cdaae6adfa130 (patch)
tree55adb83a4a7ce08d1b8727ba2b98ebb750fef7a4 /src/lib/edje/edje_util.c
parentefl_ui_win: unfocus and focus again the most upper widget (diff)
downloadefl-7c615e183110f26bf6ea1671848cdaae6adfa130.tar.gz
edje: cleanup life cycle of buffer in _edje_hash_find_helper.
Diffstat (limited to '')
-rw-r--r--src/lib/edje/edje_util.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index da5c3cb069..fc0015eac9 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -5343,7 +5343,6 @@ _edje_hash_find_helper(const Eina_Hash *hash, const char *key)
int i, j;
char **tokens;
unsigned int tokens_count = 0;
- Eina_Strbuf *buf = NULL;
data = eina_hash_find(hash, key);
if (data)
@@ -5353,6 +5352,8 @@ _edje_hash_find_helper(const Eina_Hash *hash, const char *key)
if ((tokens) && (tokens_count > 1))
{
+ Eina_Strbuf *buf = NULL;
+
buf = eina_strbuf_new();
for (i = tokens_count - 2; i >= 0; i--)
@@ -5369,12 +5370,10 @@ _edje_hash_find_helper(const Eina_Hash *hash, const char *key)
eina_strbuf_reset(buf);
}
- }
- if (buf)
- {
eina_strbuf_free(buf);
}
+
if (tokens)
{
free(tokens[0]);