From ae4274ae6c7425b37f9f75032b38301e04dbd71e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 22 Jul 2014 14:54:36 +0000 Subject: fix for assigning DWORDS in the same database variable that held a string before git-svn-id: http://svn.miranda-ng.org/main/trunk@9920 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/database/mdatabasecache.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/modules/database/mdatabasecache.cpp b/src/modules/database/mdatabasecache.cpp index 4e2b45ac7b..1705066139 100644 --- a/src/modules/database/mdatabasecache.cpp +++ b/src/modules/database/mdatabasecache.cpp @@ -159,10 +159,8 @@ void MDatabaseCache::SetCachedVariant(DBVARIANT* s /* new */, DBVARIANT* d /* ca d->pszVal = (char*)HeapAlloc(m_hCacheHeap, 0, strlen(s->pszVal) + 1); strcpy(d->pszVal, s->pszVal); } - else if (szSave != NULL) { + else if (szSave != NULL) HeapFree(m_hCacheHeap, 0, szSave); - d->pszVal = NULL; - } } void MDatabaseCache::FreeCachedVariant(DBVARIANT* V) -- cgit v1.2.3