> >> > >> +struct digest *digest_alloc_by_algo(enum hash_algo hash_algo) > >> +{ > >> + struct digest *d; > >> + struct digest_algo *algo; > >> + > >> + algo = digest_algo_get_by_algo(hash_algo); > >> + if (!algo) > >> + return NULL; > >> + > >> + d = xzalloc(sizeof(*d)); > >> + d->algo = algo; > >> + d->ctx = xzalloc(algo->ctx_length); > > > > Neither allocations are checked for failure. > > If xzalloc fails barebox will go into OOM and throw a backtrace. Makes sense. I thought about this, but failed to go back and check this myself. Sam _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox