diff options
| author | TazyFoundSoup <gardendistrict0x0@outlook.com> | 2026-04-14 19:08:16 +1000 |
|---|---|---|
| committer | TazyFoundSoup <gardendistrict0x0@outlook.com> | 2026-04-14 19:08:16 +1000 |
| commit | 9ba74e96e616b9a78095dccce307ef77e4393516 (patch) | |
| tree | 0b1dff4c3f6684acfd1443d53748a92ed48c6e9c /tests/format | |
| parent | bfb9fbd2fb8558532eb2223ec0281a04b2043c73 (diff) | |
fix(test/png): Use official ff_close_png function to free png data in
png test
Diffstat (limited to 'tests/format')
| -rw-r--r-- | tests/format/image/png/png_open.c | 6 |
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;
}
|
