From a5a6c2cf8ffc39bcdece5b9efd5853505645dcb4 Mon Sep 17 00:00:00 2001 From: Christopher Chedeau Date: Fri, 18 Apr 2014 13:14:20 -0700 Subject: [PATCH] stop allocating so much memory for nothing (c is hard) --- src/Layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Layout.c b/src/Layout.c index 181cdb69..bd3cf5a4 100644 --- a/src/Layout.c +++ b/src/Layout.c @@ -96,7 +96,7 @@ css_node_t *new_css_node() { } void new_css_node_children(css_node_t *node, unsigned int children_count) { - node->children = malloc(children_count * sizeof(css_node_t)); + node->children = malloc(children_count * sizeof(css_node_t *)); for (unsigned int i = 0; i < children_count; ++i) { node->children[i] = new_css_node(); }