From d93b1ba186554b295f032af0d4e1ef1250f5ed8a Mon Sep 17 00:00:00 2001 From: techmetx11 Date: Sun, 21 Apr 2024 13:13:25 +0100 Subject: [PATCH] Fix memory leak (by deallocating the file buffer) --- src/engine/fileOps/tfm.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/engine/fileOps/tfm.cpp b/src/engine/fileOps/tfm.cpp index 8a6880b29..cebba053d 100644 --- a/src/engine/fileOps/tfm.cpp +++ b/src/engine/fileOps/tfm.cpp @@ -894,6 +894,7 @@ bool DivEngine::loadTFMv2(unsigned char* file, size_t len) { } catch(InvalidHeaderException& e) { lastError="invalid info header!"; } - + + delete[] file; return success; }