summaryrefslogtreecommitdiff
path: root/tests/format/image/png
diff options
context:
space:
mode:
Diffstat (limited to 'tests/format/image/png')
-rw-r--r--tests/format/image/png/png_open.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/format/image/png/png_open.c b/tests/format/image/png/png_open.c
index 2e02426..a01a75b 100644
--- a/tests/format/image/png/png_open.c
+++ b/tests/format/image/png/png_open.c
@@ -17,11 +17,7 @@ ff_result fftest_rgb2x2(ff_ctx* ctx) {
ff_result res = ff_open_png(ctx, &stream, &png_ctx, FF_ENABLE);
fclose(file);
- if (png_ctx) {
- if (png_ctx->data.pixels) ctx->allocator.ff_free(png_ctx->data.pixels);
- if (png_ctx->palette) ctx->allocator.ff_free(png_ctx->palette);
- ctx->allocator.ff_free(png_ctx);
- } // go free little butterfly
+ ff_close_png(ctx, png_ctx);
return res;
}