Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
044e76df
Commit
044e76df
authored
Feb 11, 2009
by
Andrew Talbot
Committed by
Alexandre Julliard
Feb 12, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedos: Replace malloc/calloc with HeapAlloc().
parent
b5d1bfe5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
13 deletions
+13
-13
devices.c
dlls/winedos/devices.c
+1
-1
dosconf.c
dlls/winedos/dosconf.c
+6
-6
dosvm.c
dlls/winedos/dosvm.c
+3
-3
int33.c
dlls/winedos/int33.c
+2
-2
ppdev.c
dlls/winedos/ppdev.c
+1
-1
No files found.
dlls/winedos/devices.c
View file @
044e76df
...
...
@@ -134,7 +134,7 @@ static void do_strategy(CONTEXT86*ctx, int id, int extra)
void
**
hdr_ptr
=
strategy_data
[
id
];
if
(
!
hdr_ptr
)
{
hdr_ptr
=
calloc
(
1
,
sizeof
(
void
*
)
+
extra
);
hdr_ptr
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
void
*
)
+
extra
);
strategy_data
[
id
]
=
hdr_ptr
;
}
*
hdr_ptr
=
hdr
;
...
...
dlls/winedos/dosconf.c
View file @
044e76df
...
...
@@ -264,7 +264,7 @@ static int DOSCONF_Country(char **confline)
if
(
!
(
DOSCONF_JumpToEntry
(
confline
,
'='
)))
return
0
;
TRACE
(
"Country '%s'
\n
"
,
*
confline
);
if
(
DOSCONF_config
.
country
==
NULL
)
DOSCONF_config
.
country
=
malloc
(
strlen
(
*
confline
)
+
1
);
DOSCONF_config
.
country
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
*
confline
)
+
1
);
strcpy
(
DOSCONF_config
.
country
,
*
confline
);
return
1
;
}
...
...
@@ -304,7 +304,7 @@ static int DOSCONF_Shell(char **confline)
if
(
!
(
DOSCONF_JumpToEntry
(
confline
,
'='
)))
return
0
;
TRACE
(
"Shell '%s'
\n
"
,
*
confline
);
if
(
DOSCONF_config
.
shell
==
NULL
)
DOSCONF_config
.
shell
=
malloc
(
strlen
(
*
confline
)
+
1
);
DOSCONF_config
.
shell
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
*
confline
)
+
1
);
strcpy
(
DOSCONF_config
.
shell
,
*
confline
);
return
1
;
}
...
...
@@ -354,7 +354,7 @@ static int DOSCONF_Menu(char **confline)
&&
(
!
(
strncasecmp
(
*
confline
,
DOSCONF_menu_default
,
strlen
(
DOSCONF_menu_default
)))))
{
free
(
DOSCONF_menu_default
);
HeapFree
(
GetProcessHeap
(),
0
,
DOSCONF_menu_default
);
DOSCONF_menu_default
=
NULL
;
DOSCONF_menu_skip
=
0
;
}
...
...
@@ -367,7 +367,7 @@ static int DOSCONF_Menu(char **confline)
{
if
(
!
(
DOSCONF_JumpToEntry
(
confline
,
'='
)))
return
0
;
*
confline
=
strtok
(
*
confline
,
","
);
DOSCONF_menu_default
=
malloc
(
strlen
(
*
confline
)
+
1
);
DOSCONF_menu_default
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
*
confline
)
+
1
);
strcpy
(
DOSCONF_menu_default
,
*
confline
);
}
...
...
@@ -384,10 +384,10 @@ static int DOSCONF_Include(char **confline)
fgetpos
(
DOSCONF_fd
,
&
oldpos
);
fseek
(
DOSCONF_fd
,
0
,
SEEK_SET
);
TRACE
(
"Including menu '%s'
\n
"
,
*
confline
);
temp
=
malloc
(
strlen
(
*
confline
)
+
1
);
temp
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
*
confline
)
+
1
);
strcpy
(
temp
,
*
confline
);
DOSCONF_Parse
(
temp
);
free
(
temp
);
HeapFree
(
GetProcessHeap
(),
0
,
temp
);
fsetpos
(
DOSCONF_fd
,
&
oldpos
);
return
1
;
}
...
...
dlls/winedos/dosvm.c
View file @
044e76df
...
...
@@ -182,7 +182,7 @@ static void DOSVM_SendOneEvent( CONTEXT86 *context )
DOSVM_BuildCallFrame
(
context
,
event
->
relay
,
event
->
data
);
}
free
(
event
);
HeapFree
(
GetProcessHeap
(),
0
,
event
);
}
}
...
...
@@ -257,7 +257,7 @@ void WINAPI DOSVM_QueueEvent( INT irq, INT priority, DOSRELAY relay, LPVOID data
BOOL
old_pending
;
if
(
MZ_Current
())
{
event
=
malloc
(
sizeof
(
DOSEVENT
));
event
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
DOSEVENT
));
if
(
!
event
)
{
ERR
(
"out of memory allocating event entry
\n
"
);
return
;
...
...
@@ -622,7 +622,7 @@ void WINAPI DOSVM_PIC_ioport_out( WORD port, BYTE val)
current_event
=
event
->
next
;
if
(
event
->
relay
)
(
*
event
->
relay
)(
NULL
,
event
->
data
);
free
(
event
);
HeapFree
(
GetProcessHeap
(),
0
,
event
);
if
(
DOSVM_HasPendingEvents
())
{
...
...
dlls/winedos/int33.c
View file @
044e76df
...
...
@@ -218,7 +218,7 @@ static void MouseRelay(CONTEXT86 *context,void *mdata)
ctx
.
Edi
=
data
->
my
;
ctx
.
SegCs
=
SELECTOROF
(
data
->
proc
);
ctx
.
Eip
=
OFFSETOF
(
data
->
proc
);
free
(
data
);
HeapFree
(
GetProcessHeap
(),
0
,
data
);
DPMI_CallRMProc
(
&
ctx
,
NULL
,
0
,
0
);
}
...
...
@@ -264,7 +264,7 @@ static void QueueMouseRelay(DWORD mx, DWORD my, WORD mask)
}
if
((
mask
&
mouse_info
.
callmask
)
&&
mouse_info
.
callback
)
{
MCALLDATA
*
data
=
calloc
(
1
,
sizeof
(
MCALLDATA
));
MCALLDATA
*
data
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
MCALLDATA
));
data
->
proc
=
mouse_info
.
callback
;
data
->
mask
=
mask
&
mouse_info
.
callmask
;
data
->
but
=
mouse_info
.
but
;
...
...
dlls/winedos/ppdev.c
View file @
044e76df
...
...
@@ -181,7 +181,7 @@ char IO_pp_init(void)
ERR
(
"Perhaps the device is already in use or nonexistent
\n
"
);
continue
;
}
PPDeviceList
[
nports
].
devicename
=
malloc
(
sizeof
(
buffer
)
+
1
);
PPDeviceList
[
nports
].
devicename
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
buffer
)
+
1
);
if
(
!
PPDeviceList
[
nports
].
devicename
)
{
ERR
(
"No (more) space for devicename
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment