diff options
-rw-r--r-- | utilities.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utilities.cpp b/utilities.cpp index 28bb51e..115c2bf 100644 --- a/utilities.cpp +++ b/utilities.cpp @@ -369,7 +369,7 @@ int onSendFile(WPARAM w, LPARAM l) name = file[i]; else name++; - TCHAR *file_out = (TCHAR*) mir_alloc(_tcslen(name)+20); + TCHAR *file_out = new TCHAR [_tcslen(file[i])+4]; mir_sntprintf(file_out, _tcslen(name)+7, _T("%s.gpg"), name); string out; DWORD code; @@ -432,7 +432,7 @@ int onSendFile(WPARAM w, LPARAM l) } mir_free(file[i]); file[i]=mir_wstrdup(path_out.c_str()); - mir_free(file_out); + delete [] file_out; transfers.push_back(path_out); } } |