aboutsummaryrefslogtreecommitdiff
path: root/libstorycode/stylesheet.c
diff options
context:
space:
mode:
Diffstat (limited to 'libstorycode/stylesheet.c')
-rw-r--r--libstorycode/stylesheet.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libstorycode/stylesheet.c b/libstorycode/stylesheet.c
index c4625f2..2b549db 100644
--- a/libstorycode/stylesheet.c
+++ b/libstorycode/stylesheet.c
@@ -133,8 +133,20 @@ static void default_style(struct style *s)
}
+static void free_style_contents(struct style *sty)
+{
+ int i;
+ for ( i=0; i<sty->n_substyles; i++ ) {
+ free_style_contents(&sty->substyles[i]);
+ }
+ free(sty->name);
+ free(sty->substyles);
+}
+
+
void stylesheet_free(Stylesheet *s)
{
+ free_style_contents(&s->top);
free(s);
}