summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2014-02-20 14:47:14 +0200
committerDaniel Zaoui <daniel.zaoui@samsung.com>2014-03-03 14:09:56 +0200
commit2db3cdb5e33ee4a4cf67408e2a9608d438419a2c (patch)
tree26e87f2524693c0084934b12aa4dd159e1988686 /src/bin
parent21533a0079f9d0ca169eb6cad465527ba9a961bd (diff)
Eolian: Valgrind cleaning
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/eolian/common_funcs.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bin/eolian/common_funcs.c b/src/bin/eolian/common_funcs.c
index 5c9b9f0f3d..7992382934 100644
--- a/src/bin/eolian/common_funcs.c
+++ b/src/bin/eolian/common_funcs.c
@@ -101,13 +101,15 @@ _startline(char *str, char *pos)
101char* 101char*
102_first_line_get(const char *str) 102_first_line_get(const char *str)
103{ 103{
104 Eina_Strbuf *ret = eina_strbuf_new(); 104 Eina_Strbuf *buf = eina_strbuf_new();
105 if (str) 105 if (str)
106 { 106 {
107 const char *p = strchr(str, '\n'); 107 const char *p = strchr(str, '\n');
108 size_t offs = (p) ? (size_t)(p - str) : strlen(str); 108 size_t offs = (p) ? (size_t)(p - str) : strlen(str);
109 eina_strbuf_append_n(ret, str, offs); 109 eina_strbuf_append_n(buf, str, offs);
110 } 110 }
111 return eina_strbuf_string_steal(ret); 111 char *ret = eina_strbuf_string_steal(buf);
112 eina_strbuf_free(buf);
113 return ret;
112} 114}
113 115