eolian: fix memory leak in doc tokens (CID 1367505)

This commit is contained in:
Daniel Kolesa 2017-02-10 16:54:19 +01:00
parent 0356b1eb5e
commit db238d606c
1 changed files with 3 additions and 1 deletions

View File

@ -447,7 +447,9 @@ eolian_doc_token_text_get(const Eolian_Doc_Token *tok)
if (p != tok->text_end)
eina_strbuf_append_char(buf, *p);
}
return eina_strbuf_string_steal(buf);
char *ptr = eina_strbuf_string_steal(buf);
eina_strbuf_free(buf);
return ptr;
}
static Eolian_Doc_Ref_Type