forked from enlightenment/efl
theoretical bug (crash) if realloc fails - but if it fails, we will leak,
so... it only moves to be another bug. SVN revision: 46767
This commit is contained in:
parent
c7d15e868a
commit
d99307b828
|
@ -556,8 +556,17 @@ img_free(Img *img)
|
|||
strshr_freeme_count += 3;
|
||||
if (strshr_freeme_count > strshr_freeme_alloc)
|
||||
{
|
||||
const char **tmp;
|
||||
|
||||
strshr_freeme_alloc += 32;
|
||||
strshr_freeme = realloc(strshr_freeme, strshr_freeme_alloc * sizeof(const char **));
|
||||
tmp = realloc(strshr_freeme, strshr_freeme_alloc * sizeof(const char **));
|
||||
if (tmp) strshr_freeme = tmp;
|
||||
else
|
||||
{
|
||||
strshr_freeme_alloc -= 32;
|
||||
strshr_freeme_count -= 3;
|
||||
return;
|
||||
}
|
||||
}
|
||||
strshr_freeme[strshr_freeme_count - 3] = img->key;
|
||||
strshr_freeme[strshr_freeme_count - 2] = img->file.file;
|
||||
|
|
Loading…
Reference in New Issue