X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=sbr%2Freadconfig.c;h=2fe2d7d3f6082bc610e7241f468c18b0f1f83399;hp=747aedea45b1d2a38a976cf5104a50c022e03087;hb=90534bb281c5063ab582be42e253ee444b443426;hpb=10eff860a28b96582526eb739fd0a55441669938 diff --git a/sbr/readconfig.c b/sbr/readconfig.c index 747aede..2fe2d7d 100644 --- a/sbr/readconfig.c +++ b/sbr/readconfig.c @@ -52,19 +52,19 @@ readconfig(struct node **npp, FILE *ib, char *file, int ctx) ib)) { case FLD: case FLDPLUS: - np = (struct node *) mh_xcalloc(1, sizeof(*np)); + np = mh_xcalloc(1, sizeof(*np)); *npp = np; *(npp = &np->n_next) = NULL; - np->n_name = getcpy(name); + np->n_name = mh_xstrdup(name); if (state == FLDPLUS) { - cp = getcpy(field); + cp = mh_xstrdup(field); while (state == FLDPLUS) { state = m_getfld(state, name, field, sizeof(field), ib); cp = add(field, cp); } np->n_field = trimcpy(cp); - free(cp); + mh_free0(&cp); } else { np->n_field = trimcpy(field); }