evas - rectangle custouts - fix possible leak coverity found

this fixes CID 1039924
This commit is contained in:
Carsten Haitzler 2014-08-25 12:42:56 +09:00
parent 463f5a29f9
commit 8389e3e6a9
3 changed files with 4 additions and 4 deletions

View File

@ -295,7 +295,7 @@ evas_common_pipe_rectangle_prepare(void *data, RGBA_Image *dst, RGBA_Pipe_Op *op
Eina_Bool r;
recycle = evas_pipe_cutout_rects_pop(info);
r = evas_common_rectangle_draw_prepare(recycle, dst, &(op->context),
r = evas_common_rectangle_draw_prepare(&recycle, dst, &(op->context),
op->op.rect.x, op->op.rect.y,
op->op.rect.w, op->op.rect.h);
if (recycle->active) op->rects = recycle;

View File

@ -8,7 +8,7 @@ EAPI void evas_common_rectangle_draw_cb (RGBA_Image *dst, RGBA_Draw_Context *dc,
EAPI void evas_common_rectangle_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
EAPI void evas_common_rectangle_draw_do(const Cutout_Rects *reuse, const Eina_Rectangle *clip, RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
EAPI Eina_Bool evas_common_rectangle_draw_prepare(Cutout_Rects *reuse, const RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
EAPI Eina_Bool evas_common_rectangle_draw_prepare(Cutout_Rects **reuse, const RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
EAPI void evas_common_rectangle_rgba_draw (RGBA_Image *dst, DATA32 color, int render_op, int x, int y, int w, int h);

View File

@ -55,7 +55,7 @@ evas_common_rectangle_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y,
}
EAPI Eina_Bool
evas_common_rectangle_draw_prepare(Cutout_Rects *reuse, const RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h)
evas_common_rectangle_draw_prepare(Cutout_Rects **reuse, const RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h)
{
if ((w <= 0) || (h <= 0)) return EINA_FALSE;
if (!(RECTS_INTERSECT(x, y, w, h, 0, 0, dst->cache_entry.w, dst->cache_entry.h)))
@ -68,7 +68,7 @@ evas_common_rectangle_draw_prepare(Cutout_Rects *reuse, const RGBA_Image *dst, R
evas_common_draw_context_clip_clip(dc, x, y, w, h);
/* our clip is 0 size.. abort */
if ((dc->clip.w > 0) && (dc->clip.h > 0))
reuse = evas_common_draw_context_apply_cutouts(dc, reuse);
*reuse = evas_common_draw_context_apply_cutouts(dc, *reuse);
}
return EINA_TRUE;