From 6768e966c8ac857b3e7043d5ffcbba77f5e35991 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 11 Mar 2018 15:26:39 +0300 Subject: obsolete & very strange code optimized --- plugins/AVS/src/services.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'plugins/AVS/src') diff --git a/plugins/AVS/src/services.cpp b/plugins/AVS/src/services.cpp index 691b84ee10..aac9a39080 100644 --- a/plugins/AVS/src/services.cpp +++ b/plugins/AVS/src/services.cpp @@ -798,7 +798,7 @@ static void ReloadMyAvatar(LPVOID lpParam) NotifyEventHooks(hMyAvatarChanged, (WPARAM)myAvatarProto, 0); } - free(lpParam); + mir_free(lpParam); } INT_PTR ReportMyAvatarChanged(WPARAM wParam, LPARAM) @@ -812,9 +812,7 @@ INT_PTR ReportMyAvatarChanged(WPARAM wParam, LPARAM) continue; if (!mir_strcmp(it->szProtoname, proto)) { - LPVOID lpParam = (void *)malloc(mir_strlen(it->szProtoname) + 2); - mir_strcpy((char *)lpParam, it->szProtoname); - mir_forkthread(ReloadMyAvatar, lpParam); + mir_forkthread(ReloadMyAvatar, mir_strdup(it->szProtoname)); return 0; } } -- cgit v1.2.3