From 976508f30d0579e05d8ccd53be903b3cda89f508 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 18 Mar 2013 11:51:38 +0000 Subject: various memory allocation problems git-svn-id: http://svn.miranda-ng.org/main/trunk@4090 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/themes.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/TabSRMM/src') diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp index 25c50b49cc..f2c0a8e1f3 100644 --- a/plugins/TabSRMM/src/themes.cpp +++ b/plugins/TabSRMM/src/themes.cpp @@ -1233,10 +1233,11 @@ void CSkin::Unload() m_closeIcon = m_maxIcon = m_minIcon = 0; - for (i=0; i < m_nrSkinIcons; i++) { + for (i=0; i < m_nrSkinIcons; i++) if (m_skinIcons[i].phIcon ) ::DestroyIcon(*(m_skinIcons[i].phIcon)); - } + mir_free(m_skinIcons); + M->getAeroState(); // refresh after unload ::FreeTabConfig(); ::ReloadTabConfig(); @@ -1587,9 +1588,8 @@ void CSkin::LoadItems() CImageItem *pItem = m_ImageItems; if (m_skinIcons == NULL) - m_skinIcons = (TIconDescW *)malloc(sizeof(TIconDescW) * NR_MAXSKINICONS); + m_skinIcons = (TIconDescW *)mir_calloc(sizeof(TIconDescW) * NR_MAXSKINICONS); - ZeroMemory(m_skinIcons, sizeof(TIconDesc) * NR_MAXSKINICONS); m_nrSkinIcons = 0; szSections = (TCHAR *)malloc((SECT_BUFFER_SIZE + 2) * sizeof(TCHAR)); -- cgit v1.2.3