forked from enlightenment/efl
evas: fix possible memory leaks in e3d_drawable_texture_rendered_pixels_get
Summary: @fix CID: 1356243, 1356242, 1356242, 1356242 Reviewers: cedric, Hermet, raster Subscribers: jpeg Differential Revision: https://phab.enlightenment.org/D4011 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
parent
db79f8499c
commit
32d1f4b2e5
|
@ -1460,6 +1460,8 @@ e3d_drawable_texture_rendered_pixels_get(GLuint tex EINA_UNUSED, int x, int y, i
|
||||||
if (!datarowup || !datarowlow)
|
if (!datarowup || !datarowlow)
|
||||||
{
|
{
|
||||||
ERR("Not enough memory");
|
ERR("Not enough memory");
|
||||||
|
if (datarowup) free(datarowup);
|
||||||
|
if (datarowlow) free(datarowlow);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (j = 0; j < h / 2; j++)
|
for (j = 0; j < h / 2; j++)
|
||||||
|
@ -1467,7 +1469,7 @@ e3d_drawable_texture_rendered_pixels_get(GLuint tex EINA_UNUSED, int x, int y, i
|
||||||
bellow = h * w - width;
|
bellow = h * w - width;
|
||||||
up = w + width;
|
up = w + width;
|
||||||
|
|
||||||
for (i = w; i >= 0; i--)
|
for (i = w - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
pixel = buffer[bellow];
|
pixel = buffer[bellow];
|
||||||
datarowlow[i] = ((pixel & 0x000000ff) << 16) +
|
datarowlow[i] = ((pixel & 0x000000ff) << 16) +
|
||||||
|
|
Loading…
Reference in New Issue