summaryrefslogtreecommitdiff
path: root/plugins/Variables
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Variables')
-rw-r--r--plugins/Variables/src/parse_metacontacts.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/Variables/src/parse_metacontacts.cpp b/plugins/Variables/src/parse_metacontacts.cpp
index dd4f247020..564e04749f 100644
--- a/plugins/Variables/src/parse_metacontacts.cpp
+++ b/plugins/Variables/src/parse_metacontacts.cpp
@@ -51,9 +51,10 @@ static TCHAR *parseGetParent(ARGUMENTSINFO *ai)
if (szUniqueID == NULL) {
szProto = PROTOID_HANDLE;
- szUniqueID = (TCHAR *)mir_alloc(32);
- mir_sntprintf(szUniqueID, 32, _T("%p"), hContact);
- if (szProto == NULL || szUniqueID == NULL)
+ TCHAR tszID[40];
+ mir_sntprintf(tszID, SIZEOF(tszID), _T("%p"), hContact);
+ szUniqueID = mir_tstrdup(tszID);
+ if (szUniqueID == NULL)
return NULL;
}