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
4299da0d
Commit
4299da0d
authored
Mar 03, 2015
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Mar 06, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dpnet: Free previous allocated data.
parent
a5d31253
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
address.c
dlls/dpnet/address.c
+7
-6
No files found.
dlls/dpnet/address.c
View file @
4299da0d
...
...
@@ -426,6 +426,13 @@ static HRESULT WINAPI IDirectPlay8AddressImpl_AddComponent(IDirectPlay8Address *
TRACE
(
"Found %s
\n
"
,
debugstr_w
(
pwszName
));
found
=
TRUE
;
if
(
entry
->
type
==
DPNA_DATATYPE_STRING_ANSI
)
heap_free
(
entry
->
data
.
ansi
);
else
if
(
entry
->
type
==
DPNA_DATATYPE_STRING
)
heap_free
(
entry
->
data
.
string
);
else
if
(
entry
->
type
==
DPNA_DATATYPE_BINARY
)
heap_free
(
entry
->
data
.
binary
);
break
;
}
}
...
...
@@ -451,20 +458,14 @@ static HRESULT WINAPI IDirectPlay8AddressImpl_AddComponent(IDirectPlay8Address *
TRACE
(
"(%p, %u): GUID Type -> %s
\n
"
,
lpvData
,
dwDataSize
,
debugstr_guid
(
lpvData
));
break
;
case
DPNA_DATATYPE_STRING
:
heap_free
(
entry
->
data
.
string
);
entry
->
data
.
string
=
heap_strdupW
((
WCHAR
*
)
lpvData
);
TRACE
(
"(%p, %u): STRING Type -> %s
\n
"
,
lpvData
,
dwDataSize
,
debugstr_w
((
WCHAR
*
)
lpvData
));
break
;
case
DPNA_DATATYPE_STRING_ANSI
:
heap_free
(
entry
->
data
.
ansi
);
entry
->
data
.
ansi
=
heap_strdupA
((
CHAR
*
)
lpvData
);
TRACE
(
"(%p, %u): ANSI STRING Type -> %s
\n
"
,
lpvData
,
dwDataSize
,
(
const
CHAR
*
)
lpvData
);
break
;
case
DPNA_DATATYPE_BINARY
:
heap_free
(
entry
->
data
.
binary
);
entry
->
data
.
binary
=
heap_alloc
(
dwDataSize
);
memcpy
(
entry
->
data
.
binary
,
lpvData
,
dwDataSize
);
TRACE
(
"(%p, %u): BINARY Type
\n
"
,
lpvData
,
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