diff options
Diffstat (limited to 'plugins/New_GPG')
-rwxr-xr-x | plugins/New_GPG/src/main.cpp | 4 | ||||
-rwxr-xr-x | plugins/New_GPG/src/messages.cpp | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/plugins/New_GPG/src/main.cpp b/plugins/New_GPG/src/main.cpp index 93c1c704f9..261b622407 100755 --- a/plugins/New_GPG/src/main.cpp +++ b/plugins/New_GPG/src/main.cpp @@ -861,7 +861,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, SetCurrentDirectoryA(mir_path); tmp = mir_a2t(mir_path); mir_free(mir_path); - mir_realloc(path, (mir_tstrlen(path)+128)*sizeof(TCHAR)); + //mir_realloc(path, (mir_tstrlen(path)+128)*sizeof(TCHAR)); TCHAR *gpg_path = (TCHAR*)mir_alloc(sizeof(TCHAR) * MAX_PATH), *gpg_lang_path = (TCHAR*)mir_alloc(sizeof(TCHAR) * MAX_PATH); mir_tstrcpy(gpg_path, tmp); mir_tstrcat(gpg_path, _T("\\GnuPG\\gpg.exe")); @@ -873,6 +873,8 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, gpg_exists = true; mir_tstrcpy(path, _T("GnuPG\\gpg.exe")); } + else + mir_tstrcpy(path, gpg_path); if(boost::filesystem::exists(gpg_lang_path)) lang_exists = true; if(gpg_exists && !lang_exists) diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp index fbaea6013b..036cb60fd1 100755 --- a/plugins/New_GPG/src/messages.cpp +++ b/plugins/New_GPG/src/messages.cpp @@ -978,7 +978,6 @@ static INT_PTR CALLBACK DlgProcKeyPassword(HWND hwndDlg, UINT msg, WPARAM wParam password = (TCHAR*)mir_alloc(sizeof(TCHAR)*(mir_tstrlen(tmp)+1)); mir_tstrcpy(password, tmp); } - mir_free(tmp); mir_free(inkeyid); DestroyWindow(hwndDlg); } |