summaryrefslogtreecommitdiff
path: root/src/table.cc
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2009-02-20 05:49:23 +0000
committercorvid <corvid@lavabit.com>2009-02-20 05:49:23 +0000
commitf42d578f6593c34d0f96e1b78d90e8acfb9356c8 (patch)
treeda5afa44fb224518c5f6e441b17e3327f452eae8 /src/table.cc
parent6e528e088f46f9b75fcd7dc34987096ffa41f71e (diff)
CssPropertyList leak in Html_tag_open_table_cell
Diffstat (limited to 'src/table.cc')
-rw-r--r--src/table.cc14
1 files changed, 7 insertions, 7 deletions
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);