+ UCI_TRAP_SAVE(ctx, error)
+ section = (struct uci_section *) uci_malloc(ctx, sizeof(struct uci_section));
+ section->config = cfg;
+ uci_list_init(§ion->list);
+ uci_list_init(§ion->options);
+ uci_list_add(&cfg->sections, §ion->list);
+ section->type = uci_strdup(ctx, type);
+ if (name)
+ section->name = uci_strdup(ctx, name);
+ UCI_TRAP_RESTORE(ctx);
+
+ return section;
+
+error:
+ uci_drop_section(section);
+ UCI_THROW(ctx, ctx->errno);
+ return NULL;