mirror of
https://github.com/wine-mirror/wine
synced 2024-07-01 07:14:31 +00:00
inetcpl: Use CRT allocation functions.
This commit is contained in:
parent
64d9d63fec
commit
81a5a8f46b
|
@ -27,7 +27,6 @@
|
|||
|
||||
#include "inetcpl.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/heap.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(inetcpl);
|
||||
|
||||
|
@ -83,7 +82,7 @@ static DWORD create_connection_settings(BOOL manual_proxy, const WCHAR *proxy_se
|
|||
pac_url_len = 0;
|
||||
size += sizeof(DWORD)*10;
|
||||
|
||||
*ret = heap_alloc_zero(size);
|
||||
*ret = calloc(1, size);
|
||||
if(!*ret) return 0;
|
||||
|
||||
(*ret)->version = CONNECTION_SETTINGS_VERSION;
|
||||
|
@ -152,11 +151,11 @@ static void connections_on_initdialog(HWND hwnd)
|
|||
while((res = RegQueryValueExW(con, L"DefaultConnectionSettings", NULL, &type,
|
||||
(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)
|
||||
{
|
||||
RegCloseKey(con);
|
||||
heap_free(settings);
|
||||
free(settings);
|
||||
return;
|
||||
}
|
||||
settings = new_settings;
|
||||
|
@ -170,7 +169,7 @@ static void connections_on_initdialog(HWND hwnd)
|
|||
else if(settings->flags & CONNECTION_SETTINGS_WPAD)
|
||||
CheckDlgButton(hwnd, IDC_USE_WPAD, BST_CHECKED);
|
||||
}
|
||||
heap_free(settings);
|
||||
free(settings);
|
||||
}
|
||||
|
||||
TRACE("ProxyEnable = %lx\n", enabled);
|
||||
|
@ -332,7 +331,7 @@ static INT_PTR connections_on_notify(HWND hwnd, WPARAM wparam, LPARAM lparam)
|
|||
|
||||
res = RegSetValueExW(con, L"DefaultConnectionSettings", 0, REG_BINARY,
|
||||
(BYTE*)default_connection, size);
|
||||
heap_free(default_connection);
|
||||
free(default_connection);
|
||||
RegCloseKey(con);
|
||||
return !res;
|
||||
}
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
|
||||
#include "inetcpl.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/heap.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(inetcpl);
|
||||
|
||||
|
@ -273,8 +272,8 @@ static INT_PTR security_on_destroy(secdlg_data * sd)
|
|||
{
|
||||
TRACE("(%p)\n", sd);
|
||||
|
||||
heap_free(sd->zone_attr);
|
||||
heap_free(sd->zones);
|
||||
free(sd->zone_attr);
|
||||
free(sd->zones);
|
||||
if (sd->himages) {
|
||||
SendMessageW(sd->hlv, LVM_SETIMAGELIST, LVSIL_NORMAL, 0);
|
||||
ImageList_Destroy(sd->himages);
|
||||
|
@ -282,7 +281,7 @@ static INT_PTR security_on_destroy(secdlg_data * sd)
|
|||
|
||||
security_cleanup_zones(sd);
|
||||
SetWindowLongPtrW(sd->hsec, DWLP_USER, 0);
|
||||
heap_free(sd);
|
||||
free(sd);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -300,7 +299,7 @@ static INT_PTR security_on_initdialog(HWND hsec)
|
|||
DWORD lv_index = 0;
|
||||
DWORD i;
|
||||
|
||||
sd = heap_alloc_zero(sizeof(secdlg_data));
|
||||
sd = calloc(1, sizeof(secdlg_data));
|
||||
SetWindowLongPtrW(hsec, DWLP_USER, (LONG_PTR) sd);
|
||||
if (!sd) {
|
||||
return FALSE;
|
||||
|
@ -338,14 +337,14 @@ static INT_PTR security_on_initdialog(HWND hsec)
|
|||
TRACE("found %ld zones\n", sd->num_zones);
|
||||
|
||||
/* 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) {
|
||||
security_on_destroy(sd);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* 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) {
|
||||
security_on_destroy(sd);
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in New Issue
Block a user