if ((d = dict_alloc()) == NULL)
return;
if (list_append_dict(l, d) == FAIL)
+ {
+ dict_unref(d);
return;
+ }
dict_add_number(d, "lnum", (long)buf->b_changelist[i].lnum);
dict_add_number(d, "col", (long)buf->b_changelist[i].col);
dict_add_number(d, "coladd", (long)buf->b_changelist[i].coladd);
if ((d = dict_alloc()) == NULL)
return;
if (list_append_dict(l, d) == FAIL)
+ {
+ dict_unref(d);
return;
+ }
dict_add_number(d, "lnum", (long)wp->w_jumplist[i].fmark.mark.lnum);
dict_add_number(d, "col", (long)wp->w_jumplist[i].fmark.mark.col);
dict_add_number(d, "coladd", (long)wp->w_jumplist[i].fmark.mark.coladd);
if (d == NULL)
return FAIL;
if (list_append_dict(mlist, d) == FAIL)
+ {
+ dict_unref(d);
return FAIL;
+ }
if (dict_add_number(d, matchbuf ? "lnum" : "idx", idx) == FAIL)
return FAIL;
return FAIL;
if (dict_add_list(d, "submatches", sml) == FAIL)
+ {
+ list_unref(sml);
return FAIL;
+ }
// return a list with the submatches
for (int i = 1; i < NSUBEXP; ++i)