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
81f919fd
Commit
81f919fd
authored
Dec 05, 2008
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wnaspi32: Replace malloc with HeapAlloc.
parent
1a18b797
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
winaspi16.c
dlls/wnaspi32/winaspi16.c
+8
-8
No files found.
dlls/wnaspi32/winaspi16.c
View file @
81f919fd
...
...
@@ -252,7 +252,7 @@ ASPI_ExecScsiCmd(DWORD ptrPRB, UINT16 mode)
if
(
HOST_TO_TARGET
(
lpPRB
))
{
/* send header, command, and then data */
in_len
=
SCSI_OFF
+
lpPRB
->
SRB_CDBLen
+
lpPRB
->
SRB_BufLen
;
sg_hd
=
(
struct
sg_header
*
)
malloc
(
in_len
);
sg_hd
=
HeapAlloc
(
GetProcessHeap
(),
0
,
in_len
);
memset
(
sg_hd
,
0
,
SCSI_OFF
);
memcpy
(
sg_hd
+
1
,
&
lpPRB
->
CDBByte
[
0
],
lpPRB
->
SRB_CDBLen
);
if
(
lpPRB
->
SRB_BufLen
)
{
...
...
@@ -262,20 +262,20 @@ ASPI_ExecScsiCmd(DWORD ptrPRB, UINT16 mode)
else
{
/* send header and command - no data */
in_len
=
SCSI_OFF
+
lpPRB
->
SRB_CDBLen
;
sg_hd
=
(
struct
sg_header
*
)
malloc
(
in_len
);
sg_hd
=
HeapAlloc
(
GetProcessHeap
(),
0
,
in_len
);
memset
(
sg_hd
,
0
,
SCSI_OFF
);
memcpy
(
sg_hd
+
1
,
&
lpPRB
->
CDBByte
[
0
],
lpPRB
->
SRB_CDBLen
);
}
if
(
TARGET_TO_HOST
(
lpPRB
))
{
out_len
=
SCSI_OFF
+
lpPRB
->
SRB_BufLen
;
sg_reply_hdr
=
(
struct
sg_header
*
)
malloc
(
out_len
);
sg_reply_hdr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
out_len
);
memset
(
sg_reply_hdr
,
0
,
SCSI_OFF
);
sg_hd
->
reply_len
=
out_len
;
}
else
{
out_len
=
SCSI_OFF
;
sg_reply_hdr
=
(
struct
sg_header
*
)
malloc
(
out_len
);
sg_reply_hdr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
out_len
);
memset
(
sg_reply_hdr
,
0
,
SCSI_OFF
);
sg_hd
->
reply_len
=
out_len
;
}
...
...
@@ -343,8 +343,8 @@ ASPI_ExecScsiCmd(DWORD ptrPRB, UINT16 mode)
}
}
free
(
sg_reply_hdr
);
free
(
sg_hd
);
HeapFree
(
GetProcessHeap
(),
0
,
sg_reply_hdr
);
HeapFree
(
GetProcessHeap
(),
0
,
sg_hd
);
ASPI_DebugPrintResult
(
lpPRB
,
mode
);
return
SS_COMP
;
...
...
@@ -362,8 +362,8 @@ error_exit:
* We probably should set lpPRB->SRB_TargStat, SRB_HaStat ?
*/
WARN
(
"error_exit
\n
"
);
free
(
sg_reply_hdr
);
free
(
sg_hd
);
HeapFree
(
GetProcessHeap
(),
0
,
sg_reply_hdr
);
HeapFree
(
GetProcessHeap
(),
0
,
sg_hd
);
return
lpPRB
->
SRB_Status
;
}
#endif
...
...
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