diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-18 11:51:38 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-18 11:51:38 +0000 |
commit | 976508f30d0579e05d8ccd53be903b3cda89f508 (patch) | |
tree | a65671d1375d621110662adda8f0eb2c60053adf /plugins/TabSRMM | |
parent | 00f7de90210080e231b2f8c2a0bf39c8b0a048ac (diff) |
various memory allocation problems
git-svn-id: http://svn.miranda-ng.org/main/trunk@4090 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r-- | plugins/TabSRMM/src/themes.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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));
|