This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit de261b9bb2c6d304d85080ef6741198f47a28af4
Author:     James Almer <[email protected]>
AuthorDate: Thu May 28 15:21:28 2026 -0300
Commit:     James Almer <[email protected]>
CommitDate: Thu May 28 22:04:27 2026 +0000

    tests/checkasm/crc: use libavutil memory allocation helpers
    
    Signed-off-by: James Almer <[email protected]>
---
 tests/checkasm/crc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tests/checkasm/crc.c b/tests/checkasm/crc.c
index 32a1aae3ab..4202c7784c 100644
--- a/tests/checkasm/crc.c
+++ b/tests/checkasm/crc.c
@@ -87,15 +87,13 @@ void checkasm_check_crc(void)
         struct CustomTest *prev;
         AVCRC ctx[1024];
     } *ctx = NULL;
-    struct CustomTest *new = malloc(sizeof(*new));
+    struct CustomTest *new = av_mallocz(sizeof(*new));
     static int le, bits;
     static uint32_t poly;
 
     if (!new)
         fail();
 
-    memset(new, 0, sizeof(*new));
-
     if (!ctx) {
         le   = rnd() & 1;
         bits = 8 + rnd() % 25; // av_crc_init() accepts between 8 and 32 bits
@@ -103,7 +101,7 @@ void checkasm_check_crc(void)
     }
     av_assert0(av_crc_init(new->ctx, le, bits, poly, sizeof(new->ctx)) >= 0);
     if (ctx && !memcmp(ctx->ctx, new->ctx, sizeof(new->ctx))) {
-        free(new);
+        av_free(new);
     } else {
         new->prev = ctx;
         ctx = new;

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to