Skip to content

Commit

Permalink
Switch 'return NULL' to HGOTO_DONE(NULL) in H5allocate_memory
Browse files Browse the repository at this point in the history
Signed-off-by: Quincey Koziol <[email protected]>
  • Loading branch information
qkoziol committed Oct 26, 2024
1 parent cfdde80 commit 5832f7d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/H5.c
Original file line number Diff line number Diff line change
Expand Up @@ -1103,13 +1103,14 @@ H5allocate_memory(size_t size, bool clear)
FUNC_ENTER_API_NOINIT

if (0 == size)
return NULL;
HGOTO_DONE(NULL);

if (clear)
ret_value = H5MM_calloc(size);
else
ret_value = H5MM_malloc(size);

done:
FUNC_LEAVE_API_NOINIT(ret_value)
} /* end H5allocate_memory() */

Expand Down

0 comments on commit 5832f7d

Please sign in to comment.