From 04d9338eef4c3b864a1693f8312ce35f9ac8302c Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sun, 23 Oct 2011 10:57:35 +0100 Subject: Initialise styles to zero --- src/stylesheet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/stylesheet.c') diff --git a/src/stylesheet.c b/src/stylesheet.c index fea78c1..69ff98c 100644 --- a/src/stylesheet.c +++ b/src/stylesheet.c @@ -415,7 +415,7 @@ static struct style *new_style(StyleSheet *ss, const char *name) int n; struct style **styles_new; - sty = malloc(sizeof(*sty)); + sty = calloc(1, sizeof(*sty)); if ( sty == NULL ) return NULL; sty->name = strdup(name); -- cgit v1.2.3