nut: Fix unchecked allocations

CC: libav-stable@libav.org
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>