summaryrefslogtreecommitdiff
path: root/test/parse-auto.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/parse-auto.c')
-rw-r--r--test/parse-auto.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/parse-auto.c b/test/parse-auto.c
index 156c38d..0549f45 100644
--- a/test/parse-auto.c
+++ b/test/parse-auto.c
@@ -409,7 +409,7 @@ void run_test(const uint8_t *data, size_t len, exp_entry *exp, size_t explen)
if (error == CSS_OK) {
css_stylesheet *import;
- char *buf = alloca(lwc_string_length(url) + 1);
+ char *buf = malloc(lwc_string_length(url) + 1);
memcpy(buf, lwc_string_data(url),
lwc_string_length(url));
@@ -425,6 +425,8 @@ void run_test(const uint8_t *data, size_t len, exp_entry *exp, size_t explen)
error = CSS_IMPORTS_PENDING;
lwc_string_unref(url);
+
+ free(buf);
}
}