From 276cfd4e516aa6b10b2afdb82f16c9b0403dd329 Mon Sep 17 00:00:00 2001 From: itycodes Date: Thu, 3 Oct 2024 05:52:44 +0200 Subject: [PATCH] Free the allocated rif_t image in rif.h --- rif.h | 1 + 1 file changed, 1 insertion(+) diff --git a/rif.h b/rif.h index 8999986..27f2ccd 100644 --- a/rif.h +++ b/rif.h @@ -23,4 +23,5 @@ void write_rif_little(char* path, uint32_t width, uint32_t size, uint8_t format, memcpy(((char*)img)+17, data, size); FILE* output_file = fopen(path, "w"); fwrite(img, 1, IMG_SIZE, output_file); + free(img); }