Fix memory leak

svn path=/trunk/netsurf/; revision=12630
This commit is contained in:
Chris Young 2011-07-28 19:29:03 +00:00
parent 63cc03a5dc
commit 0979992f83
1 changed files with 2 additions and 1 deletions

View File

@ -295,6 +295,7 @@ static void tree_recalculate_node_element(struct tree *tree,
LOG(("Tree font width cache hit"));
#endif
} else {
if(cache_text != NULL) free(cache_text);
nsfont.font_width(&plot_fstyle,
element->text,
strlen(element->text),
@ -1680,7 +1681,7 @@ static void tree_draw_node_element(struct tree *tree,
}
x += NODE_INSTEP;
width -= NODE_INSTEP;
// width -= NODE_INSTEP;
/* fall through */
case NODE_ELEMENT_TEXT: