Skip to content

Commit

Permalink
JPEGXL: Use sail_malloc_std_signature()
Browse files Browse the repository at this point in the history
  • Loading branch information
HappySeaFox committed Nov 10, 2023
1 parent 36afbbd commit 31769ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 1 addition & 5 deletions src/sail-codecs/jpegxl/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions src/sail-codecs/jpegxl/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 31769ed

Please sign in to comment.