-/*
- * UCI wrapper for realloc, which uses exception handling
- */
-static void *uci_realloc(struct uci_context *ctx, void *ptr, size_t size)
-{
- ptr = realloc(ptr, size);
- if (!ptr)
- UCI_THROW(ctx, UCI_ERR_MEM);
+ ctx = (struct uci_context *) malloc(sizeof(struct uci_context));
+ memset(ctx, 0, sizeof(struct uci_context));
+ uci_list_init(&ctx->root);