Skip to content

Commit

Permalink
Use abort() instead of exit to get the trace log. (#1728)
Browse files Browse the repository at this point in the history
  • Loading branch information
ducnguyen-sb authored and SWilson4 committed Apr 12, 2024
1 parent a157053 commit b8c4123
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ void *OQS_MEM_checked_malloc(size_t len) {
void *ptr = malloc(len);
if (ptr == NULL) {
fprintf(stderr, "Memory allocation failed\n");
exit(EXIT_FAILURE);
abort();
}

return ptr;
Expand All @@ -285,7 +285,7 @@ void *OQS_MEM_checked_aligned_alloc(size_t alignment, size_t size) {
void *ptr = OQS_MEM_aligned_alloc(alignment, size);
if (ptr == NULL) {
fprintf(stderr, "Memory allocation failed\n");
exit(EXIT_FAILURE);
abort();
}

return ptr;
Expand Down

0 comments on commit b8c4123

Please sign in to comment.