diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-27 22:00:32 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-27 22:00:32 +0000 |
commit | d113a646feb2e98ab6314565dc77fd476786a376 (patch) | |
tree | 0f3cffbf0ab0763eef10f5fa74604463e93fa1ba | |
parent | 1fb0cd07fba1e8d6f9ac2ebe3b4f2e1c60acb81b (diff) |
correct malloc/free pair for mc
git-svn-id: http://svn.miranda-ng.org/main/trunk@8320 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | plugins/Db3x_mmap/src/dbcontacts.cpp | 2 | ||||
-rw-r--r-- | src/modules/database/mdatabasecache.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/Db3x_mmap/src/dbcontacts.cpp b/plugins/Db3x_mmap/src/dbcontacts.cpp index e0a1b83b5b..e0dfbf6108 100644 --- a/plugins/Db3x_mmap/src/dbcontacts.cpp +++ b/plugins/Db3x_mmap/src/dbcontacts.cpp @@ -249,7 +249,7 @@ void CDb3Mmap::FillContacts() DBVARIANT dbv; dbv.type = DBVT_DWORD;
cc->nSubs = (0 != GetContactSetting(dwContactID, "MetaContacts", "NumContacts", &dbv)) ? -1 : dbv.dVal;
if (cc->nSubs != -1) {
- cc->pSubs = (MCONTACT*)malloc(cc->nSubs*sizeof(MCONTACT));
+ cc->pSubs = (MCONTACT*)mir_alloc(cc->nSubs*sizeof(MCONTACT));
for (int i = 0; i < cc->nSubs; i++) {
char setting[100];
mir_snprintf(setting, sizeof(setting), "Handle%d", i);
diff --git a/src/modules/database/mdatabasecache.cpp b/src/modules/database/mdatabasecache.cpp index 2a2812515d..c688a2efa4 100644 --- a/src/modules/database/mdatabasecache.cpp +++ b/src/modules/database/mdatabasecache.cpp @@ -105,7 +105,7 @@ void MDatabaseCache::FreeCachedContact(MCONTACT contactID) V = V1;
}
- free(cc->pSubs);
+ mir_free(cc->pSubs);
HeapFree(m_hCacheHeap, 0, cc);
m_lContacts.remove(index);
|