Lines Matching refs:ml
35 struct mlist *ml;
38 - if ((ml = CAST(struct mlist *, malloc(sizeof(*ml)))) == NULL)
39 + if ((ml = CAST(struct mlist *, emalloc(sizeof(*ml)))) == NULL)
42 ml->map = idx == 0 ? map : NULL;
43 ml->magic = map->magic[idx];
44 ml->nmagic = map->nmagic[idx];
45 - if (ml->nmagic) {
46 - ml->magic_rxcomp = CAST(file_regex_t **,
47 - calloc(ml->nmagic, sizeof(*ml->magic_rxcomp)));
48 - if (ml->magic_rxcomp == NULL) {
49 - free(ml);
53 - ml->magic_rxcomp = NULL;
55 mlp->prev->next = ml;
56 ml->prev = mlp->prev;
57 ml->next = mlp;
165 mlist_free_one(struct mlist *ml)
169 if (ml->map)
170 apprentice_unmap(CAST(struct magic_map *, ml->map));
172 - for (i = 0; i < ml->nmagic; ++i) {
173 - if (ml->magic_rxcomp[i]) {
174 - file_regfree(ml->magic_rxcomp[i]);
175 - free(ml->magic_rxcomp[i]);
176 - ml->magic_rxcomp[i] = NULL;
179 - free(ml->magic_rxcomp);
180 - ml->magic_rxcomp = NULL;
181 - free(ml);
182 + efree(ml);
867 - v->magic_rxcomp = &(ml->magic_rxcomp[i]);
868 for (j = i + 1; j < ml->nmagic; j++)
2951 for (ml = ms->mlist[0]->next; ml != ms->mlist[0]; ml = ml->next) {
2952 - int ret = match(ms, ml->magic, ml->magic_rxcomp, ml->nmagic, b,
2953 + int ret = match(ms, ml->magic, ml->nmagic, b,
3142 - rv = match(ms, ml.magic, ml.magic_rxcomp, ml.nmagic, b,
3143 + rv = match(ms, ml.magic, ml.nmagic, b,