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
64bcb540
Commit
64bcb540
authored
Sep 29, 2009
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Sep 29, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
localui: Fix a memory leak.
parent
f6120c2a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
localui.c
dlls/localui/localui.c
+3
-7
No files found.
dlls/localui/localui.c
View file @
64bcb540
...
...
@@ -503,7 +503,6 @@ static BOOL WINAPI localui_AddPortUI(PCWSTR pName, HWND hWnd, PCWSTR pMonitorNam
{
addportui_t
data
;
HANDLE
hXcv
;
LPWSTR
ptr
=
NULL
;
DWORD
needed
;
DWORD
dummy
;
DWORD
status
;
...
...
@@ -529,14 +528,11 @@ static BOOL WINAPI localui_AddPortUI(PCWSTR pName, HWND hWnd, PCWSTR pMonitorNam
(
PBYTE
)
&
dummy
,
0
,
&
needed
,
&
status
);
TRACE
(
"got %u with status %u
\n
"
,
res
,
status
);
if
(
res
&&
(
status
==
ERROR_SUCCESS
))
{
if
(
res
&&
(
status
==
ERROR_SUCCESS
)
&&
ppPortName
)
{
/* Native localui uses GlobalAlloc also.
The caller must GlobalFree the buffer */
ptr
=
GlobalAlloc
(
GPTR
,
(
lstrlenW
(
data
.
portname
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
ptr
)
{
lstrcpyW
(
ptr
,
data
.
portname
);
if
(
ppPortName
)
*
ppPortName
=
ptr
;
}
*
ppPortName
=
GlobalAlloc
(
GPTR
,
(
lstrlenW
(
data
.
portname
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
*
ppPortName
)
lstrcpyW
(
*
ppPortName
,
data
.
portname
);
}
if
(
res
&&
(
status
==
ERROR_ALREADY_EXISTS
))
{
...
...
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