summaryrefslogtreecommitdiff
path: root/plugins/New_GPG/src
diff options
context:
space:
mode:
authorAlexander Gluzsky <sss123next@list.ru>2015-07-09 17:18:30 +0000
committerAlexander Gluzsky <sss123next@list.ru>2015-07-09 17:18:30 +0000
commita187813a93a1f0be12ec0bb8faa0b956517c55ad (patch)
treea9161e7992576f97c345d870ba972aada635c8a1 /plugins/New_GPG/src
parent9a3cef7fd1214ad30629f5049002971ce73f8ddf (diff)
new_gpg:
few crash fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@14519 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/New_GPG/src')
-rwxr-xr-xplugins/New_GPG/src/main.cpp4
-rwxr-xr-xplugins/New_GPG/src/messages.cpp1
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);
}