summaryrefslogtreecommitdiff
path: root/plugins/TipperYM/src
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2016-05-07 10:18:10 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2016-05-07 10:18:10 +0000
commit4ab0727b40fcccdf5df9a9c8219749ab7881dc86 (patch)
tree342f1de0f3b959fbd9cd726ef5dfb36970a1296c /plugins/TipperYM/src
parent3f350883e214aaa6c2941ade516468ed7bf1f449 (diff)
Tipper: - Fixed memory leak
git-svn-id: http://svn.miranda-ng.org/main/trunk@16811 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TipperYM/src')
-rw-r--r--plugins/TipperYM/src/subst.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp
index 10335265d9..1c6ae40d88 100644
--- a/plugins/TipperYM/src/subst.cpp
+++ b/plugins/TipperYM/src/subst.cpp
@@ -305,8 +305,9 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff
if (!hSubContact)
return false;
- TCHAR *swzNick = (TCHAR *)pcli->pfnGetContactDisplayName(hSubContact, 0);
- if (swzNick) _tcsncpy(buff, swzNick, bufflen);
+ TCHAR *swzNick = pcli->pfnGetContactDisplayName(hSubContact, 0);
+ if (swzNick)
+ _tcsncpy(buff, swzNick, bufflen);
return true;
}
else if (!mir_tstrcmp(swzRawSpec, _T("meta_subuid"))) {
@@ -760,7 +761,10 @@ TCHAR* GetProtoExtraStatusMessage(char *szProto)
TCHAR *tszParsed = variables_parse(ptszText, NULL, hContact);
if (tszParsed)
- replaceStrT(ptszText, tszParsed);
+ {
+ mir_free(ptszText);
+ ptszText = tszParsed;
+ }
}
if (opt.bLimitMsg)