From 0fddca87c34e0c9fb21defc42d688fb0aa1fb1b1 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 27 Jun 2008 10:08:22 +0200 Subject: [PATCH] draw: stop leaking image on double parsing Signed-off-by: Julien Danjou --- common/draw.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/draw.c b/common/draw.c index 1a430367..c5faef3d 100644 --- a/common/draw.c +++ b/common/draw.c @@ -223,6 +223,8 @@ draw_markup_on_element(markup_parser_data_t *p, const char *elem, *values, &data->bg_color); break; case A_TK_IMAGE: + if(data->bg_image) + draw_image_delete(&data->bg_image); data->bg_image = draw_image_new(*values); break; case A_TK_ALIGN: