UCI_THROW(ctx, UCI_ERR_IO);
}
}
- if (filename)
- free(filename);
+ free(filename);
uci_close_stream(f);
ctx->err = 0;
return changes;
UCI_TRAP_RESTORE(ctx);
done:
- if (filename)
- free(filename);
+ free(filename);
uci_close_stream(pctx->file);
uci_foreach_element_safe(&list, tmp, e) {
uci_free_element(e);
ctx->err = 0;
error:
- if (package)
- free(package);
- if (section)
- free(section);
- if (option)
- free(option);
+ free(package);
+ free(section);
+ free(option);
if (ctx->err)
UCI_THROW(ctx, ctx->err);
return 0;
done:
uci_close_stream(f);
- if (filename)
- free(filename);
+ free(filename);
if (ctx->err)
UCI_THROW(ctx, ctx->err);