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
a7cc44a6
Commit
a7cc44a6
authored
Jul 15, 2013
by
Marcus Meissner
Committed by
Alexandre Julliard
Jul 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecfg: Free result in error nodes (Coverity).
parent
ba7b56b2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
winecfg.h
programs/winecfg/winecfg.h
+10
-2
No files found.
programs/winecfg/winecfg.h
View file @
a7cc44a6
...
...
@@ -154,7 +154,11 @@ static inline char *get_text(HWND dialog, WORD id)
HWND
item
=
GetDlgItem
(
dialog
,
id
);
int
len
=
GetWindowTextLengthA
(
item
)
+
1
;
char
*
result
=
len
?
HeapAlloc
(
GetProcessHeap
(),
0
,
len
)
:
NULL
;
if
(
!
result
||
GetWindowTextA
(
item
,
result
,
len
)
==
0
)
return
NULL
;
if
(
!
result
)
return
NULL
;
if
(
GetWindowTextA
(
item
,
result
,
len
)
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
result
);
return
NULL
;
}
return
result
;
}
...
...
@@ -163,7 +167,11 @@ static inline WCHAR *get_textW(HWND dialog, WORD id)
HWND
item
=
GetDlgItem
(
dialog
,
id
);
int
len
=
GetWindowTextLengthW
(
item
)
+
1
;
WCHAR
*
result
=
len
?
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
))
:
NULL
;
if
(
!
result
||
GetWindowTextW
(
item
,
result
,
len
)
==
0
)
return
NULL
;
if
(
!
result
)
return
NULL
;
if
(
GetWindowTextW
(
item
,
result
,
len
)
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
result
);
return
NULL
;
}
return
result
;
}
...
...
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