From 46a8700cdf9aa1718de9c8f1afed605e9e7637d8 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Sat, 6 Apr 2019 13:42:03 +0200 Subject: [PATCH] tuxtxt.cpp fix possible memleak Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/bfd8adb61e485c7cb4cb784ad44deb397fbdb1a2 Author: Jacek Jendrzej Date: 2019-04-06 (Sat, 06 Apr 2019) --- lib/libtuxtxt/tuxtxt.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/libtuxtxt/tuxtxt.cpp b/lib/libtuxtxt/tuxtxt.cpp index 0bfa7d8f7..23050fdbd 100644 --- a/lib/libtuxtxt/tuxtxt.cpp +++ b/lib/libtuxtxt/tuxtxt.cpp @@ -6169,5 +6169,9 @@ int GetRCCode() RCCode = msg; return 1; } + + if( ( msg>= CRCInput::RC_WithData ) && ( msg< CRCInput::RC_WithData+ 0x10000000 ) ) + delete[] (unsigned char*) data; + return 0; }