From bfe45b2b6a2dea34402f880a7184659e4a2bdac7 Mon Sep 17 00:00:00 2001 From: Steffen Moeller Date: Tue, 24 Feb 2026 01:54:38 +0000 Subject: [PATCH] canterp: closing file upon close command --- src/emc/canterp/canterp.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/emc/canterp/canterp.cc b/src/emc/canterp/canterp.cc index e57cb8193a9..59935a81734 100644 --- a/src/emc/canterp/canterp.cc +++ b/src/emc/canterp/canterp.cc @@ -703,6 +703,10 @@ int Canterp::open(const char *newfilename) { } int Canterp::close() { + if (f) { + fclose(f); + f = (FILE*) nullptr; + } return INTERP_OK; }