evas: handling memory leak on realloc failure.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com> Reviewers: cedric Differential Revision: https://phab.enlightenment.org/D3212 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
parent
c6c84ffa6f
commit
be464e5843
|
@ -187,8 +187,14 @@ evas_common_pipe_begin(RGBA_Image *im)
|
|||
needed_size = ((im->cache_entry.w / estimatex) + 1 ) * ((im->cache_entry.h / estimatey) + 1);
|
||||
if (buf_size < needed_size)
|
||||
{
|
||||
buf = realloc(buf, sizeof (RGBA_Pipe_Thread_Info) * needed_size);
|
||||
buf_size = needed_size;
|
||||
RGBA_Pipe_Thread_Info *temp;
|
||||
|
||||
temp = realloc(buf, sizeof (RGBA_Pipe_Thread_Info) * needed_size);
|
||||
if (temp)
|
||||
{
|
||||
buf = temp;
|
||||
buf_size = needed_size;
|
||||
}
|
||||
}
|
||||
|
||||
info = buf;
|
||||
|
|
Loading…
Reference in New Issue