From 1547f90e4e7b752c6c9cb6ad6a8f54127844790a Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Sun, 3 Mar 2019 16:02:34 +0100 Subject: [PATCH] fix possible memleak --- src/gui/audioplayer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index dd025b8bf..78ea4fbe5 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -1344,6 +1344,9 @@ void CAudioPlayerGui::scanXmlData(xmlDocPtr answer_parser, const char *urltag, c element = xmlNextNode(element); g_RCInput->getMsg(&msg, &data, 0); + if( ( msg>= CRCInput::RC_WithData ) && ( msg< CRCInput::RC_WithData+ 0x10000000 ) ) + delete[] (unsigned char*) data; + } progress.hide(); } @@ -1602,6 +1605,9 @@ bool CAudioPlayerGui::openSCbrowser(void) //printf("processPlaylistUrl(%s, %s)\n", files->Url.c_str(), files->Name.c_str()); processPlaylistUrl(files->Url.c_str(), files->Name.c_str(), NULL, files->Time); g_RCInput->getMsg(&msg, &data, 0); + + if( ( msg>= CRCInput::RC_WithData ) && ( msg< CRCInput::RC_WithData+ 0x10000000 ) ) + delete[] (unsigned char*) data; } if (m_select_title_by_name) buildSearchTree();