[Horus] Memory leak at each model load

This commit is contained in:
Bertrand Songis
2016-02-29 19:24:32 +01:00
parent 52a52fdb8a
commit cc4e28857d
+1
View File
@@ -53,6 +53,7 @@ Layout * loadLayout(const char * name, Layout::PersistentData * persistentData)
void loadCustomScreens()
{
for (unsigned int i=0; i<MAX_CUSTOM_SCREENS; i++) {
delete customScreens[i];
char name[sizeof(g_model.screenData[i].layoutName)+1];
memset(name, 0, sizeof(name));
strncpy(name, g_model.screenData[i].layoutName, sizeof(g_model.screenData[i].layoutName));