Description of problem: In restore_template_fmt, when kstrdup fails, a non-NULL value will still be returned, which causes a NULL pointer access in template_desc_init_fields.
merged: https://gitee.com/anolis/cloud-kernel/pulls/1204