diff options
author | Szymon Tokarz <wsx22@o2.pl> | 2016-01-17 00:02:29 +0000 |
---|---|---|
committer | Szymon Tokarz <wsx22@o2.pl> | 2016-01-17 00:02:29 +0000 |
commit | 67218eaf83e947cc7dd8a8be0224b90e0b35f31a (patch) | |
tree | 353067ac38d518b0271bf35f75707a40ada49e4a /protocols/Sametime/src/session_announce_win.cpp | |
parent | efa07c67497a060009ebb5ec001dbd89684a4e17 (diff) |
Sametime protocol:
- patch fixes some memory leaks reported by Coverity and some other fixes and cleanup (by Wishmaster)
- some fixes by me
git-svn-id: http://svn.miranda-ng.org/main/trunk@16106 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Sametime/src/session_announce_win.cpp')
-rw-r--r-- | protocols/Sametime/src/session_announce_win.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/protocols/Sametime/src/session_announce_win.cpp b/protocols/Sametime/src/session_announce_win.cpp index 8daf9494a9..fe30966af1 100644 --- a/protocols/Sametime/src/session_announce_win.cpp +++ b/protocols/Sametime/src/session_announce_win.cpp @@ -5,8 +5,6 @@ INT_PTR CALLBACK SessionAnnounceDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wPara {
SessionAnnounceDialogProc_arg* arg = (SessionAnnounceDialogProc_arg*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
CSametimeProto *proto;
- if (arg != NULL)
- proto = arg->proto;
switch (uMsg) {
case WM_INITDIALOG:
@@ -14,7 +12,7 @@ INT_PTR CALLBACK SessionAnnounceDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wPara {
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
- SessionAnnounceDialogProc_arg* arg = (SessionAnnounceDialogProc_arg*)lParam;
+ arg = (SessionAnnounceDialogProc_arg*)lParam;
proto = arg->proto;
proto->debugLog(_T("SessionAnnounceDialogProc WM_INITDIALOG"));
@@ -56,12 +54,14 @@ INT_PTR CALLBACK SessionAnnounceDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wPara return 0;
case WM_CLOSE:
+ proto = arg->proto;
proto->debugLog(_T("SessionAnnounceDialogProc WM_CLOSE"));
mir_free(arg);
DestroyWindow(hwndDlg);
break;
case WM_COMMAND:
+ proto = arg->proto;
if (HIWORD(wParam) == BN_CLICKED) {
int size;
switch (LOWORD(wParam)) {
@@ -126,6 +126,7 @@ INT_PTR CALLBACK SessionAnnounceDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wPara }
g_list_free(safArg->recipients);
}
+ mir_free(safArg);
DestroyWindow(hwndDlg);
}
|