forked from enlightenment/efl
evas_vg_cache: Prevent memory leak
Summary: free hash_key pointer Test Plan: N/A Reviewers: Hermet, YOhoho Reviewed By: YOhoho Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10960
This commit is contained in:
parent
9178166e23
commit
1a93a4c2cc
|
@ -276,7 +276,11 @@ evas_cache_vg_surface_key_get(Efl_Canvas_Vg_Node *root, int w, int h, int frame_
|
||||||
Eina_Strbuf *hash_key = eina_strbuf_new();
|
Eina_Strbuf *hash_key = eina_strbuf_new();
|
||||||
eina_strbuf_append_printf(hash_key, "%p/%d/%d/%d", root, w, h, frame_idx);
|
eina_strbuf_append_printf(hash_key, "%p/%d/%d/%d", root, w, h, frame_idx);
|
||||||
const char *new_key = eina_strbuf_string_get(hash_key);
|
const char *new_key = eina_strbuf_string_get(hash_key);
|
||||||
if (!new_key) return NULL;
|
if (!new_key)
|
||||||
|
{
|
||||||
|
eina_strbuf_free(hash_key);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
char *key;
|
char *key;
|
||||||
|
|
Loading…
Reference in New Issue