Commit 81a5a8f4 authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

inetcpl: Use CRT allocation functions.

parent 64d9d63f
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include "inetcpl.h" #include "inetcpl.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL(inetcpl); WINE_DEFAULT_DEBUG_CHANNEL(inetcpl);
...@@ -83,7 +82,7 @@ static DWORD create_connection_settings(BOOL manual_proxy, const WCHAR *proxy_se ...@@ -83,7 +82,7 @@ static DWORD create_connection_settings(BOOL manual_proxy, const WCHAR *proxy_se
pac_url_len = 0; pac_url_len = 0;
size += sizeof(DWORD)*10; size += sizeof(DWORD)*10;
*ret = heap_alloc_zero(size); *ret = calloc(1, size);
if(!*ret) return 0; if(!*ret) return 0;
(*ret)->version = CONNECTION_SETTINGS_VERSION; (*ret)->version = CONNECTION_SETTINGS_VERSION;
...@@ -152,11 +151,11 @@ static void connections_on_initdialog(HWND hwnd) ...@@ -152,11 +151,11 @@ static void connections_on_initdialog(HWND hwnd)
while((res = RegQueryValueExW(con, L"DefaultConnectionSettings", NULL, &type, while((res = RegQueryValueExW(con, L"DefaultConnectionSettings", NULL, &type,
(BYTE*)settings, &size)) == ERROR_MORE_DATA || !settings) (BYTE*)settings, &size)) == ERROR_MORE_DATA || !settings)
{ {
connection_settings *new_settings = heap_realloc(settings, size); connection_settings *new_settings = realloc(settings, size);
if(!new_settings) if(!new_settings)
{ {
RegCloseKey(con); RegCloseKey(con);
heap_free(settings); free(settings);
return; return;
} }
settings = new_settings; settings = new_settings;
...@@ -170,7 +169,7 @@ static void connections_on_initdialog(HWND hwnd) ...@@ -170,7 +169,7 @@ static void connections_on_initdialog(HWND hwnd)
else if(settings->flags & CONNECTION_SETTINGS_WPAD) else if(settings->flags & CONNECTION_SETTINGS_WPAD)
CheckDlgButton(hwnd, IDC_USE_WPAD, BST_CHECKED); CheckDlgButton(hwnd, IDC_USE_WPAD, BST_CHECKED);
} }
heap_free(settings); free(settings);
} }
TRACE("ProxyEnable = %lx\n", enabled); TRACE("ProxyEnable = %lx\n", enabled);
...@@ -332,7 +331,7 @@ static INT_PTR connections_on_notify(HWND hwnd, WPARAM wparam, LPARAM lparam) ...@@ -332,7 +331,7 @@ static INT_PTR connections_on_notify(HWND hwnd, WPARAM wparam, LPARAM lparam)
res = RegSetValueExW(con, L"DefaultConnectionSettings", 0, REG_BINARY, res = RegSetValueExW(con, L"DefaultConnectionSettings", 0, REG_BINARY,
(BYTE*)default_connection, size); (BYTE*)default_connection, size);
heap_free(default_connection); free(default_connection);
RegCloseKey(con); RegCloseKey(con);
return !res; return !res;
} }
......
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
#include "inetcpl.h" #include "inetcpl.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL(inetcpl); WINE_DEFAULT_DEBUG_CHANNEL(inetcpl);
...@@ -273,8 +272,8 @@ static INT_PTR security_on_destroy(secdlg_data * sd) ...@@ -273,8 +272,8 @@ static INT_PTR security_on_destroy(secdlg_data * sd)
{ {
TRACE("(%p)\n", sd); TRACE("(%p)\n", sd);
heap_free(sd->zone_attr); free(sd->zone_attr);
heap_free(sd->zones); free(sd->zones);
if (sd->himages) { if (sd->himages) {
SendMessageW(sd->hlv, LVM_SETIMAGELIST, LVSIL_NORMAL, 0); SendMessageW(sd->hlv, LVM_SETIMAGELIST, LVSIL_NORMAL, 0);
ImageList_Destroy(sd->himages); ImageList_Destroy(sd->himages);
...@@ -282,7 +281,7 @@ static INT_PTR security_on_destroy(secdlg_data * sd) ...@@ -282,7 +281,7 @@ static INT_PTR security_on_destroy(secdlg_data * sd)
security_cleanup_zones(sd); security_cleanup_zones(sd);
SetWindowLongPtrW(sd->hsec, DWLP_USER, 0); SetWindowLongPtrW(sd->hsec, DWLP_USER, 0);
heap_free(sd); free(sd);
return TRUE; return TRUE;
} }
...@@ -300,7 +299,7 @@ static INT_PTR security_on_initdialog(HWND hsec) ...@@ -300,7 +299,7 @@ static INT_PTR security_on_initdialog(HWND hsec)
DWORD lv_index = 0; DWORD lv_index = 0;
DWORD i; DWORD i;
sd = heap_alloc_zero(sizeof(secdlg_data)); sd = calloc(1, sizeof(secdlg_data));
SetWindowLongPtrW(hsec, DWLP_USER, (LONG_PTR) sd); SetWindowLongPtrW(hsec, DWLP_USER, (LONG_PTR) sd);
if (!sd) { if (!sd) {
return FALSE; return FALSE;
...@@ -338,14 +337,14 @@ static INT_PTR security_on_initdialog(HWND hsec) ...@@ -338,14 +337,14 @@ static INT_PTR security_on_initdialog(HWND hsec)
TRACE("found %ld zones\n", sd->num_zones); TRACE("found %ld zones\n", sd->num_zones);
/* remember ZONEATTRIBUTES for a listview entry */ /* remember ZONEATTRIBUTES for a listview entry */
sd->zone_attr = heap_alloc(sizeof(ZONEATTRIBUTES) * sd->num_zones); sd->zone_attr = calloc(sd->num_zones, sizeof(ZONEATTRIBUTES));
if (!sd->zone_attr) { if (!sd->zone_attr) {
security_on_destroy(sd); security_on_destroy(sd);
return FALSE; return FALSE;
} }
/* remember zone number and current security level for a listview entry */ /* remember zone number and current security level for a listview entry */
sd->zones = heap_alloc((sizeof(DWORD) + sizeof(DWORD)) * sd->num_zones); sd->zones = calloc(sd->num_zones, sizeof(DWORD) + sizeof(DWORD));
if (!sd->zones) { if (!sd->zones) {
security_on_destroy(sd); security_on_destroy(sd);
return FALSE; return FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment