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
3dd7c64c
Commit
3dd7c64c
authored
Oct 29, 2012
by
André Hentschel
Committed by
Alexandre Julliard
Oct 30, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dplayx: Reorder some code to avoid memory leak (coverity).
parent
32f8548d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
dplay.c
dlls/dplayx/dplay.c
+4
-9
No files found.
dlls/dplayx/dplay.c
View file @
3dd7c64c
...
@@ -1126,10 +1126,6 @@ DP_SetGroupData( lpGroupData lpGData, DWORD dwFlags,
...
@@ -1126,10 +1126,6 @@ DP_SetGroupData( lpGroupData lpGData, DWORD dwFlags,
/* Reallocate for new data */
/* Reallocate for new data */
if
(
lpData
!=
NULL
)
if
(
lpData
!=
NULL
)
{
{
LPVOID
lpNewData
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
dwDataSize
)
);
CopyMemory
(
lpNewData
,
lpData
,
dwDataSize
);
if
(
dwFlags
&
DPSET_LOCAL
)
if
(
dwFlags
&
DPSET_LOCAL
)
{
{
lpGData
->
lpLocalData
=
lpData
;
lpGData
->
lpLocalData
=
lpData
;
...
@@ -1137,7 +1133,8 @@ DP_SetGroupData( lpGroupData lpGData, DWORD dwFlags,
...
@@ -1137,7 +1133,8 @@ DP_SetGroupData( lpGroupData lpGData, DWORD dwFlags,
}
}
else
else
{
{
lpGData
->
lpRemoteData
=
lpNewData
;
lpGData
->
lpRemoteData
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwDataSize
);
CopyMemory
(
lpGData
->
lpRemoteData
,
lpData
,
dwDataSize
);
lpGData
->
dwRemoteDataSize
=
dwDataSize
;
lpGData
->
dwRemoteDataSize
=
dwDataSize
;
}
}
}
}
...
@@ -1330,9 +1327,6 @@ DP_SetPlayerData( lpPlayerData lpPData, DWORD dwFlags,
...
@@ -1330,9 +1327,6 @@ DP_SetPlayerData( lpPlayerData lpPData, DWORD dwFlags,
/* Reallocate for new data */
/* Reallocate for new data */
if
(
lpData
!=
NULL
)
if
(
lpData
!=
NULL
)
{
{
LPVOID
lpNewData
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
dwDataSize
)
);
CopyMemory
(
lpNewData
,
lpData
,
dwDataSize
);
if
(
dwFlags
&
DPSET_LOCAL
)
if
(
dwFlags
&
DPSET_LOCAL
)
{
{
...
@@ -1341,7 +1335,8 @@ DP_SetPlayerData( lpPlayerData lpPData, DWORD dwFlags,
...
@@ -1341,7 +1335,8 @@ DP_SetPlayerData( lpPlayerData lpPData, DWORD dwFlags,
}
}
else
else
{
{
lpPData
->
lpRemoteData
=
lpNewData
;
lpPData
->
lpRemoteData
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwDataSize
);
CopyMemory
(
lpPData
->
lpRemoteData
,
lpData
,
dwDataSize
);
lpPData
->
dwRemoteDataSize
=
dwDataSize
;
lpPData
->
dwRemoteDataSize
=
dwDataSize
;
}
}
}
}
...
...
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