oops leakage on ferring an evas! fix.

SVN revision: 7059
This commit is contained in:
Carsten Haitzler 2003-06-22 02:33:25 +00:00
parent 1fafc49b8d
commit 42d8853235
2 changed files with 10 additions and 1 deletions

View File

@ -76,6 +76,7 @@ void
evas_free(Evas *e)
{
Evas_Object_List *l;
int i;
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return;
@ -117,6 +118,14 @@ evas_free(Evas *e)
e->engine.func->context_free(e->engine.data.output, e->engine.data.context);
e->engine.func->output_free(e->engine.data.output);
for (i = 0; i < e->modifiers.mod.count; i++)
free(e->modifiers.mod.list[i]);
if (e->modifiers.mod.list) free(e->modifiers.mod.list);
for (i = 0; i < e->locks.lock.count; i++)
free(e->locks.lock.list[i]);
if (e->locks.lock.list) free(e->locks.lock.list);
e->magic = 0;
free(e);
}

View File

@ -315,7 +315,7 @@ evas_common_image_find(const char *filename, const char *key, DATA64 timestamp)
else if (filename) l1 = strlen(filename);
l2 = 0;
if (key) l2 = strlen(key);
sprintf(buf, "%llx", timestamp);
snprintf(buf, sizeof(buf), "%llx", timestamp);
l3 = strlen(buf);
str = malloc(l1 + 5 + l2 + 5 + l3 +1);
if (!str)