summaryrefslogtreecommitdiff
path: root/svgtiny_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'svgtiny_test.c')
-rw-r--r--svgtiny_test.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/svgtiny_test.c b/svgtiny_test.c
index 9bb7e2e..8d485d3 100644
--- a/svgtiny_test.c
+++ b/svgtiny_test.c
@@ -40,8 +40,6 @@ int main(int argc, char *argv[])
}
size = sb.st_size;
- fprintf(stderr, "size: %lld bytes\n", (long long) size);
-
buffer = malloc(size);
if (!buffer) {
fprintf(stderr, "Unable to allocate %lld bytes\n",
@@ -69,6 +67,8 @@ int main(int argc, char *argv[])
if (code != svgtiny_OK)
fprintf(stderr, "svgtiny_parse failed: %i\n", code);
+ free(buffer);
+
printf("viewbox 0 0 %i %i\n", diagram->width, diagram->height);
for (unsigned int i = 0; i != diagram->shape_count; i++) {
@@ -126,6 +126,8 @@ int main(int argc, char *argv[])
printf("\n");
}
+ svgtiny_free(diagram);
+
return 0;
}