char *entity, char *err_str,
struct cYAML **root)
{
- struct cYAML *r = NULL, *err, *s, *itm, *cmd_obj;
+ struct cYAML *r = NULL, *err, *s, *itm = NULL, *cmd_obj;
if (root == NULL)
return;
else if (cmd_obj == NULL) {
s = cYAML_create_seq(r, cmd);
itm = cYAML_create_seq_item(s);
- } else if (cmd_obj != NULL && cmd_obj->cy_type != CYAML_TYPE_ARRAY)
+ } else if (cmd_obj != NULL && cmd_obj->cy_type != CYAML_TYPE_ARRAY) {
goto failed;
+ }
err = cYAML_create_object(itm, entity);
if (err == NULL)