From 4ab0727b40fcccdf5df9a9c8219749ab7881dc86 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Sat, 7 May 2016 10:18:10 +0000 Subject: Tipper: - Fixed memory leak git-svn-id: http://svn.miranda-ng.org/main/trunk@16811 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TipperYM/src/subst.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'plugins/TipperYM') 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) -- cgit v1.2.3