diff options
-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);
|