diff options
author | James Bursa <james@netsurf-browser.org> | 2008-02-02 18:10:19 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2008-02-02 18:10:19 +0000 |
commit | 2cdbd4fcb47430897d7aa896542dacb54c461cbc (patch) | |
tree | 9cec3a30d48ef7b9594288d78b6cc088be4efe03 /svgtiny_test.c | |
parent | 476717e96cd6012ad725474b45aadaf8bf11d2ba (diff) | |
download | libsvgtiny-2cdbd4fcb47430897d7aa896542dacb54c461cbc.tar.gz libsvgtiny-2cdbd4fcb47430897d7aa896542dacb54c461cbc.tar.bz2 |
Implement svgtiny_free() and fix memory usage.
svn path=/trunk/libsvgtiny/; revision=3825
Diffstat (limited to 'svgtiny_test.c')
-rw-r--r-- | svgtiny_test.c | 6 |
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; } |