change: add and call authorsfree()

laumann
Jul 18, 2023, 8:09 PM
UM5XFLGIZYSFAP6TFEZR4APDSSHRHZJDQKXPFGKT6LUAK7QXN33QC

Dependencies

  • [2] 5D2IYPL7 change: introduce changestore, print deleted lines
  • [3] YDQLW2ZO change: rework printing of patches - print Edit and Newvertex types
  • [4] XTVLIC24 change: refactor to print_change()
  • [*] Q7TKZCJP Add initial support for reading the offsets from a (fixed) change
  • [*] JVU3TTT5 all: switch away from typedefing anonymous structs
  • [*] LCEKN25G change: parse authors

Change contents

  • edit in change.h at line 54
    [7.1859]
    [8.284]
    void authorsfree(struct authors *);
  • edit in change.c at line 921
    [2.5967][2.5967:5991]()
    struct changeentry *e;
  • replacement in change.c at line 925
    [2.6077][2.6077:6117]()
    e = &s->entries[i];
    c = &e->change;
    [2.6077]
    [2.6117]
    c = &s->entries[i].change;
  • edit in change.c at line 934
    [2.6193]
    [2.6193]
    authorsfree(struct authors *authors)
    {
    size_t i, j;
    struct author *author;
    for (i = 0; i < authors->len; i++) {
    author = &authors->map[i];
    for (j = 0; j < author->len; j++) {
    free(author->entries[j].key);
    free(author->entries[j].value);
    }
    free(author->entries);
    }
    free(authors->map);
    }
    void
  • edit in change.c at line 953
    [2.6224]
    [2.6224]
    free(h->header.message);
    if (h->header.description)
    free(h->header.description);
    free(h->header.timestamp);
    authorsfree(&h->header.authors);