From b1ba3b6072314841b033b97b8a157f7f0d8d6978 Mon Sep 17 00:00:00 2001 From: gregory guy Date: Thu, 13 Sep 2018 16:35:48 +0200 Subject: [PATCH] newBuff pointer should be freed with delete[] Signed-off-by: gregory guy (cherry picked from commit 5117a5d105036094d7d1348ebb1f79c163b4b2ce) --- knights/io_engine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/knights/io_engine.cpp b/knights/io_engine.cpp index 1ecb2cc..8b3afc7 100644 --- a/knights/io_engine.cpp +++ b/knights/io_engine.cpp @@ -229,7 +229,7 @@ void io_engine::Recv( TDEProcess*, char *buffer, int bufLen ) strncpy( newBuff, buffer, bufLen ); newBuff[bufLen] = 0; FIFO_In += newBuff; - delete newBuff; + delete[] newBuff; if( FIFO_In.contains( TQChar('\n') ) ) {