From f540de9d3a0ab1849aee94c1405c07b45cc6bdb7 Mon Sep 17 00:00:00 2001 From: Christopher Chedeau Date: Fri, 18 Apr 2014 17:19:30 -0700 Subject: [PATCH] probably super wrong but doesn't give random memory issues anymore --- src/Layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Layout.c b/src/Layout.c index 0754af4f..349de056 100644 --- a/src/Layout.c +++ b/src/Layout.c @@ -32,7 +32,7 @@ css_node_t *new_css_node() { } void init_css_node_children(css_node_t *node, int children_count) { - node->children = malloc(children_count * sizeof(css_node_t)); + node->children = calloc(children_count, sizeof(css_node_t)); for (int i = 0; i < children_count; ++i) { init_css_node(&node->children[i]); }