summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/lua/ltexlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/lua/ltexlib.c')
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/ltexlib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/luatexdir/lua/ltexlib.c b/Build/source/texk/web2c/luatexdir/lua/ltexlib.c
index 3cdead69c48..b46df34ec06 100644
--- a/Build/source/texk/web2c/luatexdir/lua/ltexlib.c
+++ b/Build/source/texk/web2c/luatexdir/lua/ltexlib.c
@@ -261,6 +261,9 @@ void luacstring_close(int n)
free(next->text);
t = next;
next = next->next;
+ if (t==read_spindle.tail) {
+ read_spindle.tail = NULL; /* prevent double free */
+ }
free(t);
}
read_spindle.head = NULL;