summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-08-31 19:09:16 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-08-31 19:09:16 +0000
commit862c352908a9800c2721870e09a8decce5adc1da (patch)
treed3e85a65e5943ede7778c496facc448353a6ef0f
parent41ecc6f11fcfeab9428c3d5c974b26b264577a78 (diff)
double memory allocation reverted
git-svn-id: http://svn.miranda-ng.org/main/trunk@10349 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/TabSRMM/src/msglog.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp
index 86e25f8497..a448be6be0 100644
--- a/plugins/TabSRMM/src/msglog.cpp
+++ b/plugins/TabSRMM/src/msglog.cpp
@@ -1155,14 +1155,16 @@ static DWORD CALLBACK LogStreamInEvents(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG
dat->bufferOffset = 0;
switch (dat->stage) {
case STREAMSTAGE_HEADER:
- replaceStr(dat->buffer, CreateRTFHeader(dat->dlgDat));
+ mir_free(dat->buffer);
+ dat->buffer = CreateRTFHeader(dat->dlgDat);
dat->stage = STREAMSTAGE_EVENTS;
break;
case STREAMSTAGE_EVENTS:
if (dat->eventsToInsert) {
do {
- replaceStr(dat->buffer, Template_CreateRTFFromDbEvent(dat->dlgDat, dat->hContact, dat->hDbEvent, !dat->isEmpty, dat));
+ mir_free(dat->buffer);
+ dat->buffer = Template_CreateRTFFromDbEvent(dat->dlgDat, dat->hContact, dat->hDbEvent, !dat->isEmpty, dat);
if (dat->buffer)
dat->hDbEventLast = dat->hDbEvent;
dat->hDbEvent = db_event_next(dat->hContact, dat->hDbEvent);
@@ -1178,7 +1180,8 @@ static DWORD CALLBACK LogStreamInEvents(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG
//fall through
case STREAMSTAGE_TAIL:
- replaceStr(dat->buffer, CreateRTFTail(dat->dlgDat));
+ mir_free(dat->buffer);
+ dat->buffer = CreateRTFTail(dat->dlgDat);
dat->stage = STREAMSTAGE_STOP;
break;