From 9ba74e96e616b9a78095dccce307ef77e4393516 Mon Sep 17 00:00:00 2001 From: TazyFoundSoup Date: Tue, 14 Apr 2026 19:08:16 +1000 Subject: fix(test/png): Use official ff_close_png function to free png data in png test --- tests/format/image/png/png_open.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'tests/format') 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; } -- cgit v1.2.3