Introduce nalloc_nofail

This commit is contained in:
Andrea Mazzoleni 2026-07-06 18:38:50 +02:00
parent b297cbfa9b
commit db3f5af65a
12 changed files with 43 additions and 39 deletions

View file

@ -382,7 +382,7 @@ struct snapraid_handle* handle_mapping(struct snapraid_state* state, unsigned* h
}
++size; /* size is one more than the max */
handle = malloc_nofail(size * sizeof(struct snapraid_handle));
handle = nalloc_nofail(size, sizeof(struct snapraid_handle));
for (j = 0; j < size; ++j) {
/* default for empty position */