genattrtab: avoid NULL-deref on error