X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/c6a1c64318fe98826be1e98ed8a237469468df5d..2b5979253c1091073f132df6f17ec36886ade150:/sbr/fmt_compile.c diff --git a/sbr/fmt_compile.c b/sbr/fmt_compile.c index 9cec16a6..21acb5c5 100644 --- a/sbr/fmt_compile.c +++ b/sbr/fmt_compile.c @@ -562,8 +562,11 @@ do_name(char *sp, int preprocess) if (cm->c_type & CT_ADDR) { CERROR("component used as both date and address"); } - cm->c_tws = (struct tws *) - mh_xcalloc ((size_t) 1, sizeof(*cm->c_tws)); + if (cm->c_tws) { + memset (cm->c_tws, 0, sizeof *cm->c_tws); + } else { + cm->c_tws = mh_xcalloc (1, sizeof *cm->c_tws); + } fp->f_type = preprocess; PUTCOMP(sp); cm->c_type |= CT_DATE;