forked from enlightenment/efl
Just to make efence happy, use free instead of realloc on a cache size of 0.
SVN revision: 7478
This commit is contained in:
parent
af647c9aa6
commit
a566961983
|
@ -135,7 +135,15 @@ eet_cache_del(Eet_File *ef, Eet_File ***cache, int *cache_num)
|
||||||
if (i >= new_cache_num) return;
|
if (i >= new_cache_num) return;
|
||||||
new_cache_num--;
|
new_cache_num--;
|
||||||
for (j = i; j < new_cache_num; j++) new_cache[j] = new_cache[j + 1];
|
for (j = i; j < new_cache_num; j++) new_cache[j] = new_cache[j + 1];
|
||||||
new_cache = realloc(new_cache, new_cache_num * sizeof(Eet_File *));
|
if (new_cache_num > 0)
|
||||||
|
{
|
||||||
|
new_cache = realloc(new_cache, new_cache_num * sizeof(Eet_File *));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
free(new_cache);
|
||||||
|
new_cache = NULL;
|
||||||
|
}
|
||||||
*cache_num = new_cache_num;
|
*cache_num = new_cache_num;
|
||||||
if ((new_cache_num > 0) && (!new_cache)) return;
|
if ((new_cache_num > 0) && (!new_cache)) return;
|
||||||
*cache = new_cache;
|
*cache = new_cache;
|
||||||
|
|
Loading…
Reference in New Issue