X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=parse.c;h=9dd7126f3325a01a361174f492590ff07725a0af;hp=f5e6c2930af5ff8198c3522ced83abc02ee815c4;hb=b27715916ec6dd15ee3c1f30976f96fbece0d04e;hpb=1d2aca0fc893bd253a66e1b2628f8c8c5925fb41 diff --git a/parse.c b/parse.c index f5e6c29..9dd7126 100644 --- a/parse.c +++ b/parse.c @@ -72,8 +72,10 @@ static void uci_parse_cleanup(struct uci_context *ctx) if (!pctx) return; - if (pctx->cfg) + if (pctx->cfg) { + uci_list_del(&pctx->cfg->list); uci_drop_file(pctx->cfg); + } if (pctx->buf) free(pctx->buf); if (pctx->file) @@ -161,12 +163,16 @@ static char *next_arg(struct uci_context *ctx, char **str, bool required) switch (**str) { case '"': val = parse_double_quote(str); + break; case '\'': val = parse_single_quote(str); + break; case 0: val = NULL; + break; default: val = parse_unquoted(str); + break; } if (required && !val) {