moviebrowser: fix possible memleak in initSeriesMenu()

thx satbaby for hints


Origin commit data
------------------
Branch: ni/coolstream
Commit: 90406340a4
Author: Thilo Graf <dbt@novatux.de>
Date: 2019-06-25 (Tue, 25 Jun 2019)



------------------
This commit was generated by Migit
This commit is contained in:
2019-06-25 20:44:57 +02:00
committed by vanhofen
parent 7abd1a8f69
commit c628f1e0f5
2 changed files with 6 additions and 6 deletions

View File

@@ -58,7 +58,6 @@
#include <gui/components/cc.h>
#include <gui/widget/msgbox.h>
#include <gui/widget/stringinput.h>
#include <gui/widget/keyboard_input.h>
#include <dirent.h>
#include <sys/stat.h>
#include <gui/nfs.h>
@@ -3433,12 +3432,11 @@ void CMovieBrowser::initBookMarkMenu(CMenuWidget *BookmarkMenu, MI_MOVIE_INFO* m
}
#define MAX_STRING 30
void CMovieBrowser::initSeriesMenu(CMenuWidget *SeriesMenu, MI_MOVIE_INFO* movie_info)
void CMovieBrowser::initSeriesMenu(CMenuWidget *SeriesMenu, MI_MOVIE_INFO* movie_info, CKeyboardInput *SerieUserInput)
{
SeriesMenu->addIntroItems(LOCALE_MOVIEBROWSER_SERIE_HEAD);
CKeyboardInput *serieUserInput = new CKeyboardInput(LOCALE_MOVIEBROWSER_EDIT_SERIE, &movie_info->serieName, MAX_STRING); //TODO: hints
SeriesMenu->addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_SERIE_NAME, true, movie_info->serieName, serieUserInput));
SeriesMenu->addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_SERIE_NAME, true, movie_info->serieName, SerieUserInput));
SeriesMenu->addItem(GenericMenuSeparatorLine);
for (unsigned int li = 0; li < m_vHandleSerienames.size(); li++)
@@ -3484,7 +3482,8 @@ int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info)
// init series menu
CMenuWidget serieMenu(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER);
initSeriesMenu(&serieMenu, movie_info);
CKeyboardInput serieUserInput(LOCALE_MOVIEBROWSER_EDIT_SERIE, &movie_info->serieName, MAX_STRING); //TODO: hints
initSeriesMenu(&serieMenu, movie_info, &serieUserInput);
// init update movie info menu
CMenuWidget movieInfoMenuUpdate(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER);