summaryrefslogtreecommitdiffstats
path: root/roff.c
diff options
context:
space:
mode:
Diffstat (limited to 'roff.c')
-rw-r--r--roff.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/roff.c b/roff.c
index 54bebf78..5db7f4e7 100644
--- a/roff.c
+++ b/roff.c
@@ -3092,6 +3092,8 @@ roff_userdef(ROFF_ARGS)
else if (++expand_count > EXPAND_LIMIT) {
mandoc_msg(MANDOCERR_ROFFLOOP, r->parse,
ln, (int)(cp - n1), NULL);
+ free(buf->buf);
+ buf->buf = n1;
return ROFF_IGN;
}