From 19c69cf39d0ab9aee0cf45caa13d39edf1997fef Mon Sep 17 00:00:00 2001 From: Ken Hornstein Date: Mon, 12 Feb 2018 16:01:08 -0500 Subject: [PATCH] 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. --- sbr/fmt_scan.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; } -- 2.56.0