diff options
author | Szymon Tokarz <wsx22@o2.pl> | 2013-12-04 23:31:55 +0000 |
---|---|---|
committer | Szymon Tokarz <wsx22@o2.pl> | 2013-12-04 23:31:55 +0000 |
commit | ff43f6adfc9396fe36c3567f39194c878b7f9d05 (patch) | |
tree | 6470bca2906192f157c2e4055b5667f22b4505b1 /protocols/Gadu-Gadu | |
parent | 6f24350ab8764f0a8123fabac48cd1d6729b9eb6 (diff) |
Gadu-Gadu protocol
- fix crashes on 'Import list from server', 'Export list to Server' and 'Remove list from server' functions (after r6938)
git-svn-id: http://svn.miranda-ng.org/main/trunk@7052 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Gadu-Gadu')
-rw-r--r-- | protocols/Gadu-Gadu/src/import.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/protocols/Gadu-Gadu/src/import.cpp b/protocols/Gadu-Gadu/src/import.cpp index 12233c226c..1b181db775 100644 --- a/protocols/Gadu-Gadu/src/import.cpp +++ b/protocols/Gadu-Gadu/src/import.cpp @@ -264,7 +264,7 @@ INT_PTR GGPROTO::import_server(WPARAM wParam, LPARAM lParam) }
// Readup password
- char *password = getStringA(GG_KEY_PASSWORD);
+ ptrA password(getStringA(GG_KEY_PASSWORD));
if (password == NULL)
return 0;
@@ -283,7 +283,6 @@ INT_PTR GGPROTO::import_server(WPARAM wParam, LPARAM lParam) debugLogA("import_server(): Cannot import list. errno:%d: %s", errno, strerror(errno));
}
gg_LeaveCriticalSection(&sess_mutex, "import_server", 65, 2, "sess_mutex", 1);
- free(password);
return 0;
}
@@ -303,7 +302,7 @@ INT_PTR GGPROTO::remove_server(WPARAM wParam, LPARAM lParam) }
// Readup password
- char *password = getStringA(GG_KEY_PASSWORD);
+ ptrA password(getStringA(GG_KEY_PASSWORD));
if (password == NULL)
return 0;
@@ -325,7 +324,6 @@ INT_PTR GGPROTO::remove_server(WPARAM wParam, LPARAM lParam) // Set list removal
is_list_remove = TRUE;
- free(password);
return 0;
}
@@ -476,7 +474,7 @@ INT_PTR GGPROTO::export_server(WPARAM wParam, LPARAM lParam) }
// Readup password
- char *password = getStringA(GG_KEY_PASSWORD);
+ ptrA password(getStringA(GG_KEY_PASSWORD));
if (password == NULL)
return 0;
@@ -505,7 +503,6 @@ INT_PTR GGPROTO::export_server(WPARAM wParam, LPARAM lParam) // Set list removal
is_list_remove = FALSE;
free(contacts);
- free(password);
return 0;
}
|