nut: Fix unchecked allocations