From c939f59cd765b997b9e4eeabdacf4fe56aecf415 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Sat, 4 Jan 2020 11:08:11 +0100 Subject: [PATCH] themes.cpp fix scandir memleak Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/ab396978a6b05549dafe1464939021d03b62be77 Author: Jacek Jendrzej Date: 2020-01-04 (Sat, 04 Jan 2020) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/themes.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/themes.cpp b/src/gui/themes.cpp index 2b2ee0e4f..7e1beecb7 100644 --- a/src/gui/themes.cpp +++ b/src/gui/themes.cpp @@ -552,7 +552,9 @@ void CThemes::move_userDir() const char *target = ((std::string)THEMESDIR_VAR + "/" + file).c_str(); printf("[neutrino theme] moving %s to %s\n", dest, target); rename(dest, target); + free(themelist[count]); } + free(themelist); } printf("[neutrino theme] removing %s\n", USERDIR); remove(USERDIR);