From: Ken Hornstein Date: Mon, 12 Feb 2018 21:01:08 +0000 (-0500) Subject: Avoid free() in format engine for now. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/19c69cf39d0ab9aee0cf45caa13d39edf1997fef Avoid free() in format engine for now. This free() call messes up the buffer handling in scansbr.c:scan(); for now we're going to live with the leak and fix this properly when we normalize the format engine's memory handling. --- diff --git a/sbr/fmt_scan.c b/sbr/fmt_scan.c index b8e59e05..f9aee54b 100644 --- a/sbr/fmt_scan.c +++ b/sbr/fmt_scan.c @@ -1148,7 +1148,11 @@ fmt_scan (struct format *format, charstring_t scanlp, int width, int *dat, comp->c_mn will be run through FT_LS_ADDR, which will strip off any pers name. */ - free (comp->c_text); + /* NB: We remove the call to free() here + because it interferes with the buffer + management in scansbr.c. Revisit this + when we clean up memory handling */ + /* free (comp->c_text); */ comp->c_text = str = strdup (mn->m_text); comp->c_mn = mn; }