Skip to content

Commit

Permalink
Use abort() instead of exit to get the trace log.
Browse files Browse the repository at this point in the history
  • Loading branch information
ducnguyen-sb committed Mar 12, 2024
1 parent c2e15ea commit 37746eb
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 @@ -279,7 +279,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 @@ -289,7 +289,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 37746eb

Please sign in to comment.