nutdec: fix memleaks on error in nut_read_header