From f42d578f6593c34d0f96e1b78d90e8acfb9356c8 Mon Sep 17 00:00:00 2001 From: corvid Date: Fri, 20 Feb 2009 05:49:23 +0000 Subject: CssPropertyList leak in Html_tag_open_table_cell --- src/table.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/table.cc') diff --git a/src/table.cc b/src/table.cc index 20981fde..34c0f13e 100644 --- a/src/table.cc +++ b/src/table.cc @@ -244,13 +244,6 @@ static void Html_tag_open_table_cell(DilloHtml *html, const char *attrbuf; int32_t bgcolor; bool_t new_style; - CssPropertyList *props; - - // \todo any shorter way to do this? - if (S_TOP(html)->table_cell_props != NULL) - props = new CssPropertyList (*S_TOP(html)->table_cell_props); - else - props = new CssPropertyList (); switch (S_TOP(html)->table_mode) { case DILLO_HTML_TABLE_MODE_NONE: @@ -273,6 +266,13 @@ static void Html_tag_open_table_cell(DilloHtml *html, if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "rowspan"))) rowspan = MAX(1, strtol (attrbuf, NULL, 10)); + CssPropertyList *props; + // \todo any shorter way to do this? + if (S_TOP(html)->table_cell_props != NULL) + props = new CssPropertyList (*S_TOP(html)->table_cell_props); + else + props = new CssPropertyList (); + /* text style */ if (!S_TOP(html)->cell_text_align_set) { props->set (CSS_PROPERTY_TEXT_ALIGN, CSS_TYPE_ENUM, text_align); -- cgit v1.2.3