diff --git a/src/sail-codecs/jpegxl/memory.c b/src/sail-codecs/jpegxl/memory.c index d92f357a..78b976bf 100644 --- a/src/sail-codecs/jpegxl/memory.c +++ b/src/sail-codecs/jpegxl/memory.c @@ -31,11 +31,7 @@ void *jpegxl_private_alloc_func(void *opaque, size_t size) { (void)opaque; - void *ptr; - SAIL_TRY_OR_EXECUTE(sail_malloc(size, &ptr), - /* on error */ return NULL); - - return ptr; + return sail_malloc_std_signature(size); } void jpegxl_private_free_func(void *opaque, void *address) diff --git a/src/sail-codecs/jpegxl/memory.h b/src/sail-codecs/jpegxl/memory.h index 3d83ef16..031d0907 100644 --- a/src/sail-codecs/jpegxl/memory.h +++ b/src/sail-codecs/jpegxl/memory.h @@ -30,6 +30,7 @@ /* We want to allocate/free with sail_malloc()/sail_free(). */ SAIL_HIDDEN void *jpegxl_private_alloc_func(void *opaque, size_t size); + SAIL_HIDDEN void jpegxl_private_free_func(void *opaque, void *address); #endif