diff options
Diffstat (limited to 'src/oplist.c')
| -rw-r--r-- | src/oplist.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/oplist.c b/src/oplist.c index fa6977a..b3b782f 100644 --- a/src/oplist.c +++ b/src/oplist.c | |||
| @@ -677,9 +677,13 @@ static int node_from_openstep(parse_ctx ctx, plist_t *plist) | |||
| 677 | ctx->pos++; | 677 | ctx->pos++; |
| 678 | } | 678 | } |
| 679 | if (ctx->err) { | 679 | if (ctx->err) { |
| 680 | byte_array_free(bytes); | ||
| 681 | plist_free_data(data); | ||
| 680 | goto err_out; | 682 | goto err_out; |
| 681 | } | 683 | } |
| 682 | if (*ctx->pos != '>') { | 684 | if (*ctx->pos != '>') { |
| 685 | byte_array_free(bytes); | ||
| 686 | plist_free_data(data); | ||
| 683 | PLIST_OSTEP_ERR("Missing terminating '>' at offset %ld\n", ctx->pos - ctx->start); | 687 | PLIST_OSTEP_ERR("Missing terminating '>' at offset %ld\n", ctx->pos - ctx->start); |
| 684 | ctx->err++; | 688 | ctx->err++; |
| 685 | goto err_out; | 689 | goto err_out; |
| @@ -707,6 +711,7 @@ static int node_from_openstep(parse_ctx ctx, plist_t *plist) | |||
| 707 | ctx->pos++; | 711 | ctx->pos++; |
| 708 | } | 712 | } |
| 709 | if (*ctx->pos != c) { | 713 | if (*ctx->pos != c) { |
| 714 | plist_free_data(data); | ||
| 710 | PLIST_OSTEP_ERR("Missing closing quote (%c) at offset %ld\n", c, ctx->pos - ctx->start); | 715 | PLIST_OSTEP_ERR("Missing closing quote (%c) at offset %ld\n", c, ctx->pos - ctx->start); |
| 711 | ctx->err++; | 716 | ctx->err++; |
| 712 | goto err_out; | 717 | goto err_out; |
| @@ -807,6 +812,7 @@ static int node_from_openstep(parse_ctx ctx, plist_t *plist) | |||
| 807 | parse_skip_ws(ctx); | 812 | parse_skip_ws(ctx); |
| 808 | break; | 813 | break; |
| 809 | } else { | 814 | } else { |
| 815 | plist_free_data(data); | ||
| 810 | PLIST_OSTEP_ERR("Unexpected character when parsing unquoted string at offset %ld\n", ctx->pos - ctx->start); | 816 | PLIST_OSTEP_ERR("Unexpected character when parsing unquoted string at offset %ld\n", ctx->pos - ctx->start); |
| 811 | ctx->err++; | 817 | ctx->err++; |
| 812 | break; | 818 | break; |
| @@ -817,6 +823,7 @@ static int node_from_openstep(parse_ctx ctx, plist_t *plist) | |||
| 817 | 823 | ||
| 818 | err_out: | 824 | err_out: |
| 819 | if (ctx->err) { | 825 | if (ctx->err) { |
| 826 | plist_free(subnode); | ||
| 820 | plist_free(*plist); | 827 | plist_free(*plist); |
| 821 | *plist = NULL; | 828 | *plist = NULL; |
| 822 | return PLIST_ERR_PARSE; | 829 | return PLIST_ERR_PARSE; |
