summaryrefslogtreecommitdiff
path: root/src/lib
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
parent63ef60402f438895b7dfb7300530b199c2248240 (diff)
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 da5c3cb..fc0015e 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)
5343 int i, j; 5343 int i, j;
5344 char **tokens; 5344 char **tokens;
5345 unsigned int tokens_count = 0; 5345 unsigned int tokens_count = 0;
5346 Eina_Strbuf *buf = NULL;
5347 5346
5348 data = eina_hash_find(hash, key); 5347 data = eina_hash_find(hash, key);
5349 if (data) 5348 if (data)
@@ -5353,6 +5352,8 @@ _edje_hash_find_helper(const Eina_Hash *hash, const char *key)
5353 5352
5354 if ((tokens) && (tokens_count > 1)) 5353 if ((tokens) && (tokens_count > 1))
5355 { 5354 {
5355 Eina_Strbuf *buf = NULL;
5356
5356 buf = eina_strbuf_new(); 5357 buf = eina_strbuf_new();
5357 5358
5358 for (i = tokens_count - 2; i >= 0; i--) 5359 for (i = tokens_count - 2; i >= 0; i--)
@@ -5369,12 +5370,10 @@ _edje_hash_find_helper(const Eina_Hash *hash, const char *key)
5369 5370
5370 eina_strbuf_reset(buf); 5371 eina_strbuf_reset(buf);
5371 } 5372 }
5372 }
5373 5373
5374 if (buf)
5375 {
5376 eina_strbuf_free(buf); 5374 eina_strbuf_free(buf);
5377 } 5375 }
5376
5378 if (tokens) 5377 if (tokens)
5379 { 5378 {
5380 free(tokens[0]); 5379 free(tokens[0]);