forked from enlightenment/efl
Fix memleak reported by Coverity.
NB: Fixes Coverity CID1039654 Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
eabc1482f9
commit
1ea718c283
|
@ -70,10 +70,16 @@ evas_gl_common_poly_point_add(Evas_GL_Polygon *poly, int x, int y)
|
|||
{
|
||||
Evas_GL_Polygon_Point *pt;
|
||||
|
||||
if (!poly) poly = calloc(1, sizeof(Evas_GL_Polygon));
|
||||
if (!poly) return NULL;
|
||||
pt = calloc(1, sizeof(Evas_GL_Polygon_Point));
|
||||
if (!pt) return NULL;
|
||||
|
||||
if (!poly) poly = calloc(1, sizeof(Evas_GL_Polygon));
|
||||
if (!poly)
|
||||
{
|
||||
free(pt);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pt->x = x;
|
||||
pt->y = y;
|
||||
poly->points = eina_list_append(poly->points, pt);
|
||||
|
|
Loading…
Reference in New Issue