cmd/gpt: avoid NULL check before free()